Académique Documents
Professionnel Documents
Culture Documents
This manual is copyright ed. All rights are reserved . This document may
not , in whole or part, be copied, photocopied, reproduced , translated or
reduced to any electronic medium or machine readable form without prior
consent , in writing , from Apple Computer , Inc .
© 1982 by Apple Computer , Inc .
20525 Mariani Avenue
Cupertino , California 95014
(408) 996-1010
The word Apple and the Apple logo are registered trademarks of
Apple Computer , Inc.
£. Warning
This equipment has been certified to comply with the limits for a
Class B computing device, pursuant to Subpart J of Part 15 of FCC
Rules . Only peripherals (computer input/output devices, terminals ,
printers , etc .) certified to comply with the Class B limits may be
attached to this computer. Operation with non-certified peripherals is
likely to result in interference to radio and TV reception.
This equipment has been tested and complies with the limits for a
Class B computing device in accordance with the specifications in
Subpart J, Part 15, of FCC rules. These rules are designed to
provide reasonable protection against such interference in a
residential installation . However, there is no guarantee that the
interference will not occur in a particular installation , especially if
you use a "rabbit ear" television antenna. (A " rabbit ear" antenna is
the telescoping-rod type usually contained on TV receivers .)
Introduction 3
3 Installation
4 80-Column Features
4 About the Auxiliary Memory
Contents
Programming Examples 33
35 Identifying Different Configurations
37 Apple lie Identification in Assembly Language
40 Apple lie Identification from BASIC
41 Apple lie Identification from Pascal
43 Storing Graphics Pages from Applesoft
46 Storing Data Strings from Pascal
Index 53
Schematic Diagram 59
There are two ways you are likely to use the extended version of
the SO-Column Text Card :
The extended text card is installed the same way as the standard
SO-column card : read the Apple lie aO-Column Text Card Manual
for directions .
Preface
Most application programs run the same with either card-in fact ,
many of them don't even take advantage of the extra memory on
the extended card ; they simply use it to display 80 columns of
text. Programs that do use the extra memory may do so
automatically , without any action on your part, or they may let you
select optional features or data storage . To find out how to use
those programs with the extra memory , refer to their instruction
manuals.
In short, if you just want to use this card for displaying 80 columns
of text, and you aren 't developing a program that uses the auxiliary
memory, all you really need to know can be found in the Apple lie
aO-Column Text Card Manual and in the instructions for your
application programs.
Warning
Important warnings appear in boxes like this.
Preface
Extended Text Card Supplement
Introduction
3 Installation
4 80-Column Features
4 About the Auxiliary Memory
Introduction
Chapter 1
Introduction
The design of the Apple lie Extended 80-Column Text Card is the
same as that of the standard Apple lie 80-Column Text Card . The
only difference is that the extended text card contains 64K bytes
of auxiliary memory (programmable memory or RAM) while the
standard card contains only 1 K byte of RAM . The 80-column
display requires only 1 K byte of auxiliary memory, so it will work
with either card. The firmware that supports the special features
associated with the 80-column display is part of the Apple lie itself ,
and works the same regardless of which card is present.
Installation
Installing the Extended 80-Column Text Card is easy: do it just the
way you install the standard 80-Column Text Card. Either card fits
into the auxiliary slot (labeled A U X _ CON NEe TOR) on the main logic
board inside the Apple lie. If you haven't installed the card yet ,
follow the directions given in the Apple lie aD-Column Text Card
Manual.
Warning
Never install or remove anything inside the Appl e lie with the power on .
There is a small red lamp-an LED-toward the back of the main circuit
board to remind you of this ; if the red lamp is on, turn off the power
before you do anything inside the Apple lie .
Introduction
BO-Column Features
The built-in firmware that supports the 80-column display has other
features in addition to the wider display. The Apple lie aD-Column
Text Card Manual tells you how to activate the built-in firmware and
the 80-column display. That manual also describes many of the
Apple lie's features .
You can find more information about the Apple lie in the Apple lie
Reference Manual. Chapter 2 includes a description of the different
display modes and how to select them . Chapter 3 includes tables
of the functions of the escape sequences and control keys in the
Apple lie.
The processor in the Apple lie can only address 64K bytes of
memory . The computer has special circuits that programs can
switch to access auxiliary memory in place of main memory. At any
one time , locations in the same 64K address space are in either
main memory or auxiliary memory. In other words , even though an
Apple lie with an Extended 80-Column Text Card has a total of
1 28K bytes of programmable memory , it is not appropriate to call it
an 128K-byte system . Rather , there are 64K bytes of auxiliary
memory that can be swapped for main memory under program
control .
Warning
Careless switching to the auxiliary memory is almost certain to crash
your programs . If you want to use auxiliary memory in your own
programs , be sure to study the rest of this supplement and the relevant
information in the Apple /Ie Reference Manual.
$FFFF
Bank· Bank·
HOOO Switched Switched
Memory Memory
$0000 I I
$CFFF
I/O
$C OOO
$BFFF
$6000
Hi·Res
Graphics
$4000 Page 2
Hi·Res Hi·Res
Graphics Graphics
$2000 Page 1 Page 1X
$COO
Text
$800 Page 2
Text Text
$400 Page 1 Page 1X
$200
Warning
Remember that addresses in page zero and the 6502 stack switch to
auxiliary memory any time you switch the bank-switched memory to
auxiliary memory.
Memory pages are 256 bytes long, but The main memory and the auxiliary memory are connected to the
display pages are either 1024 bytes ,
e.g., text Page 1, or 8 192 bytes, e.g.,
address bus in parallel , so both are activated during the display
high-resolution graphics Page 1. See cycle . The 40-column display uses every other clock cycle and
Chapters 2 an d 4 of the Apple lie fetches data only from main memory . The 80-column display uses
Reference Manual.
the remaining clock cycles to process the additional display data
from auxiliary memory .
Auxiliary
RAM
~-
74LS3 74
<1>1-+
Buffer
80-Column Text Card
Video
Address
Bus
Data
Bus
7
..
Serial
ROM 4 Video
... Char ~ 1 Out
Gen. 6
6
74LS374 '---
</> 0--+
1
Buffer
t
Main
VID7M
... RAM
The byte of display data from main memory goes to a buffer on the
main logic board , and the display data from auxiliary memory goes
to a buffer on the extended text card . When the 80-column display
is on , the data bytes from these buffers are switched onto the
video data bus on alternate clock cycles : first the byte from the
auxiliary memory, then the byte from the main memory. The main
memory provides the characters displayed in the odd columns of
the display , and the auxiliary memory provides the characters in the
even columns.
For those who would like to have a graphics display with twice the
horizontal resolution, there is a way to disable the circuit that forces
normal graphics timing with 80-column text. There are two things
you must do to obtain the double high-resolution display :
This procedure works only on the Apple lie with the Rev B (and
later) main logic board , identified by a B as the last letter of the part
number on the back part of the board . Connecting the pins on the
Extended 80-Column Text Card completes a connection between
pin 50 (AN3) and pin 55 (FRCTXT') on the auxiliary slot.
.. Warning
Do not attempt to use the auxiliary memory directly from a program in
an interpreter language such as BASIC or Pascal. The interpreters that
run such programs use several areas in main memory , including the
stack and the zero page . If you switch to auxiliary memory in these
pages , the interpreter crashes. When you reset the system to start
over, your program and data are lost.
Display Pages
The Apple lie generates its video displays from data stored in
specific areas in memory called display pages . The 40-column -text
and low-resolution-graphics modes use text Page 1 and text
Page 2 , located at 1 024-2047 (hexadecimal $ 4 0 0-$ 7 F F) and
2048-3071 ($800 - $BFF) in main memory .
Table 3-2 shows the locations of the soft switches that control the
display modes. The table gives the switch locations in three forms:
hexadecimal , decimal , and negative decimal. You can use the
hexadecimal values in your machine-language programs. Use the
decimal values in PEE K or PO K E commands in Applesoft BASIC ; the
negative values are for Integer BASIC.
For information about th e keyboard data Some of the soft switches in Table 3-2 are marked read or write .
and strobe functions , see Chapter 2 of
the Apple lie Reference Manual.
Those soft switches share their locations with the keyboard data
and strobe functions. To perform the function shown in the table ,
use only the operation listed there. Soft switches that are not
marked may be accessed by either a read or a write . When writing
to a soft switch , it doesn't matter what value you write ; the switch
function occurs when you address the location , and the value is
ignored .
Warning
Be sure to use only the indicated operations to manipulate the
switches . If you read from a switch marked write , you won 't get the
correct data. If you write to a switch marked read , you won 't set the
switch you wanted , and you may change some other switch so as to
cause your program to malfunction.
When you read a soft switch , you get a byte with the state of the
switch in bit 7, the high-order bit. The other bits in the byte are
unpredictable. If you are programming in machine language , this bit
is the sign bit. If you read a soft-switch from a BASIC program , you
get a value between 0 and 255 . Bit 7 has a value of 1 28 , so if the
switch is on, the value will be equal to or greater than 1 28 ; if the
switch is off, the value will be less than 1 28 .
You'll have to write a short program to tryout the 80S TOR E and
PAGE 2 soft switches . When you try to change these switches by using
the Monitor program , it changes them back in the process of displaying
the commands you type .
For a description of the way the high- Double high-resolution graphics mode displays each pair of data
order bit acts as color-select bit in bytes as 14 adjacent dots , seven from each byte . The high-order
high-resolution displays , see Chapters 2
and 7 of the Apple lie Reference bit (color-select bit) of each byte is ignored. The auxiliary-memory
Manual. byte is displayed first , so data from auxiliary memory appears in
columns 0-6 , 14-20, etc ., up to columns 547 -552 . Data from main
memory appears in columns 7-13 , 21-27 , and so on up to
553-559 .
MAIN SOO S01 S02 S03 S04 S05 S06 S49 $4A $48 S4C $40 $4E $4F
MEMORY 0 1 2 3 4 5 6 73 74 75 76 77 78 79
AUXILIARY $00 $01 $02 $03 $04 $05 $06 $07 $49 $4A $4 9 $4C $40 $4E $4F
MEMORY 0 1 2 3 4 5 6 7 73 74 75 76 77 78 79
$400 1024
$480 1152
$500 1280
$580 1408
$600 1536
$680 1664
$700 1792
I
$780 1920
$428 1064
$4A8 1192
$528 1320
$5A8 1448
$628 1576
$6A8 1704
$728 1832
$7A8 1960
$450 1104
$400 1232
$550 1360
$5 0 0 1488
$650 1616
$600 1744
$750 1872
$700 2000
.. Warning
The display soft switches 80S TOR E, PAGE 2, and HIRE S, discussed
here and in the previous section , are used primarily for addressing
display data. These switches override the general-purpose switches
described in this section , so you must set them correctly even if your
program doesn't use them .
Warning
Before using these switches, you must fully understand the effects of
switching to auxiliary memory . For example, an application program
running in the 48K bank of auxiliary memory that tries to use the built-in
I/O routines by calling the standard I/O links will crash even though the
main ROM, which contains the built-in I/O routines , has been selected .
This happens because the standard links call DOS routines , and DOS is
in the 48K bank of main memory , which is locked out while the
application program is running in auxiliary memory.
Wh en RAMWRT and RAMRD are on , Writing to the soft-switch at location $ COO 3 turns RAM RD on and
auxiliary memory is used ; w hen they are
enables auxiliary memory for reading ; writing to location $ COO 2
off , main memory is used.
turns RAM R D off and enables main memory for reading . Writing to
the soft-switch at location $ COOS turns RAM II RT on and enables the
auxiliary memory for writing ; writing to location $ COO 4 turns RAM II RT
off and enables main memory for writing . By setting these switches
independently , you can use any of the four combinations of reading
and writing in main or auxiliary memory .
If you are using both the 4BK-bank control switches and the
display-page control switches , the display-page control switches
take priority: if BOSTORE is off, RAMRD and RAMWRT work for the
entire memory space from $0200 to $BFFF , but if BOSTORE is on ,
RAM R 0 and RAM WRT have no effect on the display page .
Specifically , if B0 S TOR E is on and H IRES is off, P AGE 2 controls text
Page 1 regardless of the settings of RAM R 0 and RAM II RT . Likewise ,
if BOSTORE and HIRES are both on , PAGE2 controls both text
Page 1 and high-resolution graphics Page 1, again regardless of
RAM R0 and RAM WR T .
You can find out the settings of these soft switches by reading
from two other locations. The byte you read at location $ C013 has
its high bit (the sign bit) set to 1 if RAM R 0 is on (auxiliary memory is
enabled for reading). or 0 if RAM R 0 is off (the 4BK block of main
memory is enabled for reading). The byte at location $ C0 1 4 has its
high bit set to 1 if RAM II RT is on (auxiliary memory is enabled for
writing). or 0 if RAMWRT is off (the 4BK block of main memory is
enabled for writing) .
$FFFF
Bank· Bank·
Switched Switched
Memory
I
Memory
I
$O FFF
$0000
$BFFF
$6000
Hi-Res
Graphics
$4000 Page 2
Hi-Res Hi-Res
Graphics Graphics
$2000 Page 1 Page 1X
$COO
Text
$800 Page 2
Text Text
$400 Page 1 Page 1X
$200
Bank· Bank-
Switched Switched
I l
$OFFF Memory Memory
$0000
$BFFF
$6000
Hi-Res
Graphics
$4000 Page 2
Hi-Res Hi-Res
Graphics Graphics
$2000 Page 1 Page 1 X
$COO
Text
$800 Page 2
Text Text
$400 Page 1 Page 1X
$200
When the A L T Z P soft switc h is on, To find out the setting of this soft switch , read location $ co 1 6. The
auxi liary memory is used ; when it is off ,
data byte you get has its high bit (the sign bit) set to 1 if A L T Z P is
main memory is used.
on (the bank-switched area, stack, and zero page in the auxiliary
memory are selected) , or 0 if A L T Z P is off (the same areas in main
memory are selected).
To have enough memory locations for all of the soft switches and
remain compatible with the Apple II and Apple II Plus , the soft switches
listed in Table 3-3 share their memory locations with the keyboard
functions listed in Chapter 2 of the Apple lie Reference Manual.
Whichever operation-read or write-is shown in Table 3-3 for
controlling the auxiliary memory is the one that is not used for reading
the keyboard and clearing the strobe .
$FFFF
Bank· Bank·
Switched Switched
I I
$OFFF Memory Memory
$0000
$BFFF
$6000
Hi·Res
Graphics
$4000 Page 2
Hi·Res Hi·Res
Graphics Graphics
$2000 Page 1 Page 1 X
$COO
Text
$800 Page 2
Text Text
$400 Page 1 Page 1X
$ 2 00
$ FFFF
Bank· Bank-
Switched Switched
I
Memory
I
$OFFF Memory
$0000
$BFFF
$6000
Hi-Res
Graphics
$4000 Page 2
Hi-Res Hi-Res
Graphics Graphics
$2000 Page 1 Page 1X
$COO
Text
$800 Page 2
Text Text
$400 Page 1 Page 1X
$200
You use these built-in subroutines the same way you use the I/O
subroutines described in Chapter 3 of the Apple lie Reference
Manual: by making subroutine calls to their starting locations . Those
locations are shown in Table 3-4 .
Table 3-4. Auxiliary·Memory Routines
Subroutine
Name Location Description
Warning
Don 't try to use AUXM0 V E to copy data in page zero , page one (the
6502 stack) , or in the bank-switched memory ($OOOO-$FFFF) .
AUXMOVE uses page zero while it is copying, so it can't handle moves
in the memory space switched by A L T Z P.
The pairs of bytes you use for passing addresses to this subroutine
are called A 1, A 2, and A 4; they are used for passing parameters to
several of the Apple lie's built-in routines . The addresses of these
byte pairs are shown in Table 3-5.
Put the addresses of the first and last bytes of the block 'of
memory you want to copy into A 1 and A 2. Put the starting address
of the block of memory you want to copy the data to into A 4.
Put the transfer address into the two bytes at locations $3 ED and
$ 3 E E, with the low-order byte first , as usual. The direction of the
transfer is controlled by the carry bit: set the carry bit to transfer to
a program in auxiliary memory ; clear the carry bit to transfer to a
The overflow bit is bit 6 in the program in main memory . Use the overflow bit to select which page
processor status word ; use the C LV zero and stack you want to use : clear the overflow bit to use the
instruction to clear it. To set it, force an
overflow by adding two numbers that main memory; set the overflow bit to use the auxiliary memory.
total more than 127 .
Warning
It is the programmer's responsibility to save the current stack pointer
somewhere in the current memory space before using X FER and to
restore it after regaining control. Failure to do so will cause program
errors.
After you have set up the parameters , pass control to the X FER
routine by a jump instruction , rather than a subroutine call. X FER
saves the accumulator and the transfer address on the current
stack, then sets up the soft switches for the parameters you have
selected and jumps to the new program .
Programming Examples
Programming Examples
$20 (32) Apple lie, but no Apple lie 80-Column Text Card
$40 (64) Apple lie with 80-Column Text Card without auxi liary memory
Programming Examples
Note: An 80-column card installed in expansion slot 3 will work in an
Apple lie the same as in an Apple II or Apple II Plus, but it does not
activate the built-in 80-column firmware . The identification program does
not detect such a card , but returns a code of 32: no Apple lie
80-Column Text Card.
Warning
If you change the identification routine , make sure that it still determines
the configuration in the same way as the original. Later revisions of th e
Apple lie may not support other identification procedures .
Programming Examples
Apple lie Identification Prog ram
1982
PARAM ORG S204
SAFE EQU S3CF
SAVE EQU S0001 ; START OF CODE RELOCATED ON PAGE ZERO
EQU S200 ; START OF FOUR BYTE LANGUAGE CARD 10
PHP ;OISABLE INTERRUPTS
SEI
LOA SEOOO ;SAVE 4 BYTES FROM
STA SAVE ;ROMRAM AREA FOR LATER
LOA SOOOO ; RESTORING OF RAMROM
STA SAVE + 1 ;TO ORIGINAL CONDITION
LOA S0400
STA SAVE+2
LOA S0800
STA SAVE + 3
LOA SC081 ;ENSURE READING ROM BY TURNING OFF
LOA SC081 ;BANKABLE MEM.
LOA SFBB3 ;GET APPLE lIE SIGNATURE BYTE
CMP # S6
BNE OUT1 ;IF NOT # 6 THEN NOT APPLEIIE
LOA SC017 ;WAS 80 COLUMNS FOUND DURING STARTUP
BMI OUT2 ; IF HI BIT ON THEN NO 80 COLUMN CARD
LOA SC013 ;SEE IF AUX MEMORY BEING READ
BMI OUT4 ;AUX MEM BEING USED SO AUX MEM AVAI L .
LOA SC016 ;SEE IF AUX ZP BEING USED
BMI OUT4 ;AUX ZP BEING USED SO AUX MEM AVAIL
LOY # OONE-START ;NOT SURE YET SO KEEP CHECKING
MV LOX START-1, Y ;SWAP SECTION OF ZP WITH
LOA SAFE-1,Y ; CODE NEEDING SAFE LOCATION DURING
STX SAFE-1,Y ; READ AUX MEM
STA START-1, Y
DEY
BNE MV
JMP SAFE ; JUMP TO SAFE GROUND
ON PHP ;BACK FROM SAFE GROUND . SAVE STATU S
LOY # OONE-START ;MOVE ZERO PAGE BACK
MV2 LOA START-1, Y
STA SAFE-1, Y
DEY
BNE MV2
PLA ;GET BACK STATUS
BCS OUT3 ; CARRY SET SO NO AUX MEM
OUT4 LOA # S80 ;MAOE IT SO THERE I S AUX MEM SET
STA PARAM ;PARAM = S80
JMP OUT
OUT3 LOA #$40 ; 80 COLUMNS BUT NO AUX SO S ET
STA PARAM ;PARAM = S40
JMP OUT
OUT2 LOA # S20 ;APPLE I IE BUT NO CARD SO SET
STA PARAM ; PARAM = S20
JMP OUT
OUT1 LOA #0 ;NOT AN APPLE liE SO SET PARAM = O
STA PAR AM
Programming Examples
Apple lie Identification from BASIC
One way to identify the configuration of an Apple lie from BASIC is
to load (using B LOA D) the machine-code version of the assembly-
language routine described in the previous section , then execute a
CAL L statement to location 724 ($ 2 D4) . When the subroutine
returns to the BASIC program , executing aPE EK at location 975
($ 3 C F) gets the result.
, ..
.FUNC 10,0
RETURN . EQU o ;TEMP STORAGE OF RETURN TO PAS CAL ADDRES S
SAFE . EQU 0002 ;START OF CODE RELOCATED ON PAGE ZERO
POP RETURN
PULL_BIAS
PHP ; LOCK OUT INTERRUPTS
SEI
LOA OC089 ; ENSURE READING ROM BY TURNING OFF
LOA OC089 ; BANKABLE MEM
LOA OFBB3 ;GET APPLE lIe SIGNITURE BYTE
CMP #6
BNE OUT1 ; IF NOT # 6 THEN NOT APPLE I Ie
LOA OC017 ;WAS 80 COLUMNS FOUND DURING S TARTUP
BMI OUT2 ;IF HIGH BIT ON THEN NO 80- COL UMN CARD
LOA OC013 ;SEE IF AUX MEMORY BEING READ
BMI OUT4 ;AUX MEM BEING USED SO AUX MEM AVAIL
LOA OC016 ; SEE IF AUX ZP BEING USED
BMI OUT4 ;AUX ZP BEING USED SO AUX MEM AVAIL
LOY # 2A ;NOT SURE YET SO KEEP CHECKING
MV LOX START-1, Y ;SWAP SECTION OF ZP WITH
LOA SAFE-1,Y ; CODE NEEDING SAFE LOCATION DURING
STX SAFE-1,Y ; READ AUX MEM
STA START-1, Y
DEY
Programming Examples
BNE MV
JMP SAFE ; JUMP TO SAFE GROUND
ON PHP ;BACK FROM SAFE GROUND. S AVE STATU S
LOY #2 A ;MOVE ZERO PAGE BACK
MV2 LOA START-1,Y
STA SAFE-1,Y
DEY
BNE MV2
PLA ;GET BACK STATUS
BCS OUT3 ; CARRY SET SO NO AUX MEM
OUT4 LOA # 80 ;MADE IT SO THERE IS AUX MEM- SE T
STA PARAM ;PARAM = $SO
JMP OUT
OUT3 LOA # 40 ;SO COLUMNS BUT NO AU X SO SE T
STA PARAM ;PARAM = $40
JMP OUT
OUT2 LOA #20 ;APPLE I Ie BUT NO CARD SO SET
STA PARAM ;PARAM = $20
JMP OUT
OUT1 LOA #0 ;NOT AN APPLE lIe SO SET PARAM =O
STA PARAM
OUT LOA OCOSB ;GET PASCAL BACK
LOA OCOSB
PLP ;REACTIVATE INTERRUPT S
LOA #0 ; PUT 0 IN HIGH BYTE OF RESULTS
PHA
LOA PARAM ;PUT FOUND VALUE IN LOW BYTE & PU SH
PHA
LOA RETURN + 1 ; RESTORE PASCAL RETURN ADD
PHA
LOA RETURN
PHA
RTS
PARAM • BYTE
There is one form of data that uses lots of memory and is simple
enough to handle from Applesoft: high-resolution graphics pages .
The auxiliary memory is an ideal place to store as many as five
complex graphics pages for rapid loading into the display buffer.
The program has two phases: in the first, the program generates
five different high-resolution views and stores them in auxiliary
memory ; in the second, the program loads the stored graphics
pages back into main memory one after another.
Hi-Res Page Mover f or Auxiliary
Memory Demo. Using AUXMOVE
OSECT
Subroutine. July 1982
ORG $3C
PARM = Hi byte of BUF. AOOR. (Page #
times 32) .
SRCBEG os 2
Call PUT PA G to copy hi-res graphics
SRCENO os
page to A U X. ME M . location specified by
os
OESTBEG os
PARM .
OENO
Call GETPAG to load hi-res graphics page
from AUX. MEM. location specified by
PARM. *
PG1 BEG EQU $2000
PG1ENO EQU $3FFB
AUXMOVE EQU $C311
ORG $300
PARM os
*
* MOVE HI-RES PAGE TO AUX MEM:
Programming Examples
PUTPAG EQU *
LOA #) PG1BEG ; PAGE STARTING
STA SRCBEG ;ADDRESS
LOA #( PG1 BEG
STA SRCBEG+1
*
LOA #) PG1 END ; PAGE ENDING
STA SRCEND ;ADDRESS
LOA #( PG1 END
STA SRCEND+1
*
* PARM - DESTINATION ADDRES S
*
LOA #0 ;DESTINATION
STA DESTBEG ;PAGE BEGINNING
LOA PARM ;ADDRES S
STA DESTBEG + 1
*
* USE AUXMOVE TO DO IT:
*
SEC
JSR AUXMOVE
RTS
*
* COPY PAGE TO MA I N MEMORY
*
GETPAG EQU *
LOA #) PG1BEG ;DESTINATION
STA DESTBEG ;PAGE BEGINNING
LOA #( PG1BEG ;ADDRESS
STA DESTBEG+1
*
* PARM - SOURC E ADDRES SES
*
LOA #0 ; PARM FOR
STA SRCBEG ; SO URCE BEGINNING
LOA PARM ;ADDRESS
STA SRCBEG + 1
*
LOA #$F8 ; CO MPUTE SOURC E
STA SRCEND ; ENDING ADDRE SS
CLC
LOA PARM
AD C # $1 F
STA SRCEND + 1
Programming Examples
4 1 10 ::: IF NOT FI RST TH EN HPLOT T O PX ,PY
4 200 : : NE X T THETA
430 0 NE X T IA NGLE
4400 VTA B 23 : HTAB 9
44 1 0 PRINT " . . . s t o ring vi ew #" ; V IEW
4499 RE M
4500 REM Pu t vie w in au x i li a ry mem o r y:
4510 POKE PA RM,V IE W * 32
4520 CA LL PUTP A GE
4600 NE XT V IEW
4689 REM
4690 RE M F iv e v ie ws s t o red-- n o w s h o w t hem:
4700 HOME VTAB 2 3
4720 HT AB 3: PRINT " Loading v ie ws fr o m au x i liar y memor y. "
4998 REM
4999 REM L o o p s tart i ng at 5000 br in g s vi e ws f rom au xi l ia ry mem ory:
5000 FOR VIEW = 1 TO 5
5020 : POK E PARM,VIEW * 32
5040 : CAL L BRINGPAGE
5060 NE XT V IEW
5997 REM
5998 REM Repeat s ame fi v e v ie ws fo re v er,
59 9 9 REM or u nti l the fu s e b l o ws :
6000 GO T O 5 000
The code that moves the strings to and from auxiliary memory is
stored at EO 0 0 in the Extended BO-Column Text Card . A separate
initialization routine puts this code at EO 0 0, just once , to maintain
system performance .
Like the other examples , these routines were written for a particular
application and are not general-purpose subroutines. They are included
here to show you the kind of thing you can do with the au xiliary
memory .
REGISTER MAP
ZREGOO .EQU
ZREG02 .EQU 4
ZREG04 . EQU 6
The pr ogra m gets here from a JSR i n MOVE_FR_AUX, and goe s back so
that the aux; Liary mem ory can be tu rned ba ck off. Zero page on the
extended text car d cont a i n s ZREGOO and ZREG02; the y are the
argumen ts for the mov e . Stack u s age: The return addre ss in 48K main
mem o r y;s sto red in the au xi li ar y s ta ck . Thi s;s the o n ly use of the
aux; t ia ry memor y stack.
Programming Examples
E002 S TUF C LD
STA RDAUX48 READ AU X 48K
LOY #0
LOA (ZREGOO), Y READING AU X 48K
USING AUX ZERO PAGE
STA ( ZREG02), Y WRITING MAIN 48K
BEQ E002EXIT NOT LIKELY, BUT POS SI BLE
TAY
E002LOOP LOA (ZREGOO), Y
STA (ZREG02), Y
DEY
BNE E002LOOP
E002E XI T STA RDMAIN48 READ MAIN 48K
RTS GOING BA CK TO 4BK RAM
The program gets here fro m a JSR ;n MOVE_TO _ AUX, and goes back so
that th e aux; l;ary memory can be turned back off. Zero page on the
extended text card conta; ns ZREGOO and ZREG02 exact ly as they are
found on the main zero page.
Stack usage: The return address in 48K main memory is stored in the
aux; liary stack. Thi s is the only use of the aux; liary memory
stack.
Note a lso that the aux; l;ary zero page ;s used for the to and from
addresses.
The following code is linke d into the main Pas cal program. Th is co de
stores the argument s in the auxi li ar y zero page and then jumps to Exxx on
the Ext ended 80-Co lu mn Te xt Card •
Programming Examples
REGISTER MAP
ZREGOO .EQU o
ZREG02 .EQU 4
Purp ose: Move a string from au xl tiary mem ory to Pa scal . Most of the
actua l move; S done a t aux i l i ary mem o r y loeat; on E002 .
.END
Programming Examples
Index
Index
B o
bandwidth , video mon itor 11 data addresses 29
bank switches 9 data bus 7, 11
bank-switched memory 9, 25, data, moving 29
36 OAT A statements 40, 43
warning 9 data strin gs 46
with auxiliary memory 9 decimal 17
BASIC 15, 37, 40, 43 destination starting
Applesoft 17 address 30
Integer 17 display buffer 43
reading soft switches display circuitry 18
from 17 display cycle 9
warning using 15 display data 10, 21
bit 0 29 display modes 4
bit 7 17 display pages 16
bit control switches 22
carry 29, 31 length 9
color-select 19 locations, table 16
high-order 19, 22, 25 See also graphics pages
overflow 31 display soft switches, table 18
sign 17, 22, 25 display, 80-column 19
built-in 80-column display figure 20
routines 16 DOS 3.3 viii , 15, 21
built-in 1/0 routines 21 dot patterns 10
built-in subroutines 29, 30 double high-resolution graphics
bus (560 dot) 11-12, 19
address 7 obtaining 11
data 7 board necessary for 12
byte with Rev A Apple lie 12
high-order 30, 31
low-order 30, 31 E
c 80-column card , any 36
80-column display 10, 11 , 16,
CAL l statement 15, 40 19, 36
carry bit 29, 30, 31 addressing directly 18
circuitry, display 18 bandwidth needed 10
C lC instruction 29, 30 firmware 3, 4, 36
clock cycle 9 figure 20
with 80-column display map 10
on 10 storing data 9
C l v instruction 31 switch for 11
color mon itor, RG B 10, 11 with clock cycles 9
color-select bit 19 versus 40-column display (dot
commands patterns) 10
PEE K 17, 43 BOCOl soft switch 18
PO KE 17, 43 80-Column Text Card 4, 16, 35,
computer configuration , 36
identifying 35-37 80-column text 11 , 12, 19
configuration 35 mode 12
configuration of the BOSTORE soft switch 18, 19, 22
computer 35-37 figure 23, 24, 28
control keys 4 table 26
control switches 22 warning 21
Index
main memory viii , 7, 9, 10, 12, PAGE2 soft switch 18, 19, 22
15, 16, 18, 19, 21 , 25, 31 figure 28
address bus 9 table 26
switching 4 warning 21
memory page zero 9, 29, 30, 31
amount card contains viii warning 29
auxiliary 15 parameters 30
select switches, table 26 Pascal 30, 35, 37, 41
bank-switched 25 1.1 viii , 15
reading 21 , 25 functions 15
writing 21 , 22, 25 procedures 15, 30
memory locations 17 routines , programming
Memory Management Unit 7 examples 47-51
memory map 9, 12, 19 storing data strings from 46
diagram 8 warning using 15
memory pages, length 9 PEEK 17, 40, 43
memory switching 15 POKE 43 , 17
mixed graphics modes 11 power-on light 3
MI XED soft switch 18 procedures, Pascal 15, 30
MMU 7 procedures, assembly-
modes, mixed graphics 11 language 29
Molex-type pins 11 processor 4
Monitor program 19 processor status word 29, 31
monitor, low bandwidth 19 program starting address 31
monochrome monitor 11 program
moving data 29 Apple lie identification 38-39
Apple lie identification
N (Pascal) 41 -42
negative decimal 17 Applesoft example using
AUXMOVE 44
o assembly-language 29
operation machine-language 17
read 17, 25 Monitor 19
warning with 17 programmable memory,
write 17, 25 amount 4
warning with 17 programming examples 35-51
overflow bit 31 R
p RAM 4, 7
amount 3
Page 1
auxiliary memory 15
display 19
RAMRD soft switch 21 , 22
graphics 22
high -resolution graphics 12, figure 23, 24
table 26
19
RAMWRT soft switch 21 , 22
text 16, 18, 22
figure 23, 24
page one 9
table 26
warning 29
read operation 17, 25
Page 1X
warning 17
display 16, 18, 19
reading memory 21 , 25
high-resoluti on graphics 19
registers , X and Y 30
text 16 Rev A Apple lie 12
pages, high-resolution Rev A main logic board ,
graphics 43 warning 12
Page 2, text 16 Rev B main logic board 11
RGB color monitor 10, 11
Index
Extended Text Card Supplement
TI?: it EX
;;_~~"'¥",f=
r ~~\k'1 ~ "r" ~ ~
M ~
f-:";"0
~:r f\
'"
'"
:: :1;'
0 21 "
Schematic
Schematic Diagram
.5
NC
'5 I 2 ~ 4 5 6 7 8 9
I -5
7 7
20 10 o !0
~44 ~
45~
18 2 2
t.!OI 43 17 ~ 4 5 42 VIO l
~40 16
US5
4 7
UBI
6 41 VI02
t.!03 39 15
LS245
5 8 LS374 9 38 VIO ~
~21 14 6 13 12 22~
~20 13 7 14 15
19~
~'7 12 8
9
17 16 18~
~'6
" R!f-°~9 18
~E,
19 15 ~
a e
RJ'W~0
52
26
35 ~
1214 i2 14 i2 14 1214 12 14 12 14 i l '4 1214
'5
n~
Q~ 53
R2 15
RI
~4 47n 4 UAI UA2 UA3 UM UA5 UA6 UA7 UA8
47" 9 6664 6664 6664 6664 6664 6664 6664
f*R51 6664
RAI I 13
10
f * R 49
RA3
~'3
48
"
12
RA5 14 6
t:§?46 7
RA7 9 5
~
'F'RCTXT* 55
~~
~23
[ic,~6
~~~~0--~!~---I~---!~---I~---!~---!~---I~--~I----I----I----4~
(I (2 C3 C4 (5 C6 (7 (8 C9 CICiI
~~3I~-+I---+I---I~~I~~I---+I---+I---I~~I~~I---1~
Schematic Diagram