home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
genie-commodore-file-library
/
GEOSApps
/
GEOSTECHREF2.ARC
/
PAGE26-38
next >
Wrap
Text File
|
2019-04-13
|
29KB
|
859 lines
╟┼╧╙ ╦ERNAL ╥OUTINES 1-23
╞UNCTION ╬AME: ─╥┴╫├╚
╨URPOSE: ─RAWS A CHARACTER.
├ALL ADDRESS: $├202
╔NPUT REQUIREMENTS:
┴ ╘HE ┴╙├╔╔ VALUE OF THE CHARACTER.
$05 ╥OW TO PRINT ON (1 ABOVE THE UNDERLINE).
$18-$19 ├OLUMN TO PRINT IN.
$33 ╘HE TOP MARGIN (╒SUALLY 0).
$34 ╘HE BOTTOM MARGIN (╒SUALLY 199).
─ESCRIPTION: ╘HIS ROUTINE IS NOT EXACTLY THE SAME AS ─╙╨├╚╥. ╘HIS
ROUTINE DOES NOT PROCESS CONTROL CHARACTERS AT ALL. ╔T ALSO DOES
NOT CHECK LEFT AND RIGHT MARGINS AT ALL. ╔T ONLY CHECKS TOP AND
BOTTOM MARGINS SO THAT IT STAYS ON SCREEN.
╞UNCTION ╬AME: ─╥╓╬┴═
╨URPOSE: ├OMPUTE THE ADDRESS OF THE DISK'S NAME.
├ALL ADDRESS: $├298
╔NPUT REQUIREMENTS:
╪ ┴DDRESS TO PLACE POINTER IN.
$8489 ├URRENT DRIVE NUMBER.
╧UTPUT:
╠OCATION IN ZERO PAGE POINTED TO BY ╪ HAS THE ADDRESS OF THE
CURRENT DRIVE'S NAME.
╨REPARATORY ROUTINES: ╧╨╬─╙╦
─ESCRIPTION: ╘HIS ROUTINE COMPUTES THE ADDRESS OF THE CURRENT
DRIVE'S NAME BY MULTIPLYING THE DRIVE NUMBER (MINUS 8) BY 18,
THEN THE OFFSET OF $841┼ IS ADDED TO THAT. ╘HE RESULT OF THE
COMPUTATION IS STORED AT THE ZERO PAGE ADDRESS IN ╪.
╞UNCTION ╬AME: ─╥╓╙┼╘
╨URPOSE: ╙ET CURRENT DRIVE.
├ALL ADDRESS: $├2┬0
╔NPUT REQUIREMENTS:
┴ ─EVICE NUMBER OF DRIVE (8-11).
╧UTPUT:
$┬┴ ╙ET TO NEW DEVICE NUMBER.
$8489 ╙ET TO NEW DRIVE NUMBER.
─ESCRIPTION: ╔F THE DRIVE BEING SPECIFIED IS NOT THE CURRENT
DRIVE THEN ├╠╥╥─┘ IS CALLED TO CLEAR THE CURRENT DRIVE. ╘HEN
LOCATIONS $┬┴ AND $8489 ARE SET TO THE NEW DRIVE NUMBER. ╬O OTHER
LOCATIONS ARE AFFECTED, NOR IS ANYTHING ACTUALLY DONE WITH THE
DRIVE.
╞UNCTION ╬AME: ─╥╫═╬╒
╨URPOSE: ╥EDRAWS THE PRESENT MENU.
├ALL ADDRESS: $├193
─ESCRIPTION: ╘HIS ROUTINE REDRAWS THE CURRENT MENU.
╟┼╧╙ ╦ERNAL ╥OUTINES 1-24
╞UNCTION ╬AME: ─╙┼╘╒╨
╨URPOSE: ╙ETS UP A DRIVE WITH TURBODOS.
├ALL ADDRESS: $├214
╔NPUT REQUIREMENTS:
$8489 ├URRENT DRIVE NUMBER.
┼RRORS: ╙EE ┴PPENDIX ╔.
─ESCRIPTION: ╘HIS ROUTINE INITIALIZES THE CURRENT DRIVE, SENDING
TURBODOS IF NECESSARY. ╔T THEN CAUSES THE DRIVE TO RUN TURBODOS.
╘HIS ROUTINE IS CALLED BY SEVERAL OF THE DISK ╔/╧ ROUTINES, MOST
NOTABLY ARE ╥┼┴─ AND ╫╥╔╘┼. ╒PON INITIALIZING THE DRIVE, THE
DRIVE'S STATUS BYTE IS SET TO THE APPROPRIATE VALUE. ╘HE STATUS
BYTES ARE STORED AT $8492-$8495 AND HAVE THE FOLLOWING BIT
DEFINITIONS:
┬IT 7 ╘URBODOS IS LOADED.
┬IT 6 ╘URBODOS IS RUNNING.
╞UNCTION ╬AME: ─╙╨├╚╥
╨URPOSE: ─ISPLAYS A CHARACTER ON THE SCREEN.
├ALL ADDRESS: $├145
╔NPUT REQUIREMENTS:
┴ ╘HE CHARACTER TO BE PRINTED.
$02-$03 ╨OINTER TO EXTRA DATA (╒SED BY A FEW CONTROL
CHARACTERS, NOT NEEDED OTHERWISE).
$05 ╘HE ROW FOR PRINTING (1 ABOVE THE UNDERLINE).
$18-$19 ╘HE COLUMN TO START PRINTING.
$33 ╘HE TOP MARGIN (╒SUALLY 0).
$34 ╘HE BOTTOM MARGIN (╒SUALLY 199).
$35-$36 ╘HE LEFT MARGIN.
$37-$38 ╘HE RIGHT MARGIN.
╨REPARATORY ROUTINES: ╙┼╠┬╙╫ OR ╞╧╬╘
┼RRORS: ┬RANCHES THROUGH $84┴┬-$84┴├ IF RIGHT MARGIN IS EXCEEDED.
─ESCRIPTION: ╘HIS ROUTINE DISPLAYS A CHARACTER IN A GIVEN
LOCATION IN THE CURRENT FONT AND STYLE. ╘HE STYLE BYTE IN
LOCATION $2┼ IS CODED AS FOLLOWS:
┬IT ─ESCRIPTION
7 ╒NDERLINE
6 ┬OLDFACE
5 ╥EVERSED
4 ╔TALICS
3 ╧UTLINED
┼ITHER ╙┼╠┬╙╫ OR ╞╧╬╘ MUST BE CALLED PRIOR TO USING THIS ROUTINE,
IN ORDER TO SET UP THE FONT POINTERS. ╙┼╠┬╙╫ IS CALLED DURING
╟┼╧╙'S BOOTUP PROCEDURE, AS WELL AS BY THE MENU PROCESSOR.
╙EVERAL CONTROL CHARACTERS HAVE SPECIAL PROPERTIES. ╘HOSE WHICH
REQUIRE A DATA POINTER ARE MARKED WITH AN ASTERISK.
╟┼╧╙ ╦ERNAL ╥OUTINES 1-25
├ONTROL ├HARACTER ╘ABLE
├TRL-╚ ─ELETE PREVIOUS CHARACTER.
├TRL-╔ ╘AB.
├TRL-╩ ═OVE STRAIGHT DOWN A LINE.
├TRL-╦ ╙ET TEXT CURSOR TO 0,0.
├TRL-╠ ═OVE STRAIGHT UP A LINE.
├TRL-═ ═OVE TO THE BEGINNING OF THE NEXT LINE.
├TRL-╬ ╘URN ON UNDERLINING.
├TRL-╧ ╘URN OFF UNDERLINING.
* ├TRL-╨ ╞OLLOWED BY A TABLE SUITABLE FOR ╟╥╨╚╔├.
├TRL-╥ ╘URN ON REVERSE VIDEO.
├TRL-╙ ╘URN OFF REVERSE VIDEO.
* ├TRL-╘ ╞OLLOWED BY 2 BYTES WHICH SPECIFY THE NEW COLUMN.
* ├TRL-╒ ╞OLLOWED BY A BYTE WHICH SPECIFIES THE NEW ROW.
* ├TRL-╓ ╞OLLOWED BY 3 BYTES WHICH SPECIFY THE NEW PRINT
POSITION.
* ├TRL-╫ ╙KIPS THE NEXT 3 BYTES.
├TRL-╪ ╘URN ON ┬OLDFACE.
├TRL-┘ ╘URN ON ╔TALICS.
├TRL-┌ ╘URN ON ╧UTLINE.
├TRL- ╘URN OFF ALL EFFECTS, RETURN TO PLAIN TEXT.
╘HOSE ENTRIES MARKED WITH AN ASTERISK (*) SHOULD ONLY BE USED
FROM ─╙╨╘╪╘ BECAUSE THEY REQUIRE $02-$03 TO BE A POINTER TO GET
EXTRA DATA. ┴S WITH ╟╥╨╚╔├, ├TRL-╨ MUST BE THE LAST COMMAND
BECAUSE THE ZERO BYTE THAT TERMINATES ╟╥╨╚╔├ WILL TERMINATE
─╙╨╘╪╘.
╞UNCTION ╬AME: ─╙╨╬╒═
╨URPOSE: ─ISPLAY AN UNSIGNED 16 BIT INTEGER.
├ALL ADDRESS: $├184
╔NPUT REQUIREMENTS:
┴ ├ONTROL VALUE (╙EE DESCRIPTION).
$02-$03 ╘HE VALUE TO BE DISPLAYED.
─ESCRIPTION: ╘HIS ROUTINE CONVERTS THE VALUE AT $02-$03 TO
DECIMAL ┴╙├╔╔ AND DISPLAYS IT USING ─╙╨├╚╥. ╘HE CONTROL VALUE IN
┴ IS DEFINED AS FOLLOWS:
BIT 7 0 - RIGHT JUSTIFY THE NUMBER.
1 - LEFT JUSTIFY THE NUMBER, IE. NO JUSTIFY.
BIT 6 0 - PRINT LEADING ZEROES.
1 - SKIP LEADING ZEROES.
BITS 0-5 ╘HE FIELD WIDTH IN PIXELS FOR RIGHT JUSTIFICATION.
╟┼╧╙ ╦ERNAL ╥OUTINES 1-26
╞UNCTION ╬AME: ─╙╨╘╪2
╨URPOSE: ╔DENTICAL TO ─╙╨╘╪╘, BUT WITH INLINE CODE.
├ALL ADDRESS: $├1┴┼
╔NPUT REQUIREMENTS:
$35-$36 ╘HE LEFT MARGIN.
$37-$38 ╘HE RIGHT MARGIN.
╨REPARATORY ROUTINES: ╙┼╠┬╙╫ OR ╞╧╬╘
┼RRORS: ┬RANCHES THROUGH $84┴┬-$84┴├ IF RIGHT MARGIN IS EXCEEDED.
─ESCRIPTION: ╘HIS ROUTINE CREATES A POINTER TO THE TEXT, CALLS
─╙╨╘╪╘, THEN RETURNS TO THE CODE IMMEDIATELY FOLLOWING THE TEXT.
╩╙╥ ─╙╨╘╪2
.╫╧╥─ ╘HE COLUMN TO START PRINTING IN
.┬┘╘┼ ╥OW FOR LINE OF PRINT (1 ABOVE THE UNDERLINE)
.┬┘╘┼ ╘EXT TO BE DISPLAYED
.┬┘╘┼ 0
├ONTROL RETURNS HERE AFTER TEXT IS PRINTED.
╞UNCTION ╬AME: ─╙╨╘╪╘
╨URPOSE: ─ISPLAYS AN ENTIRE STRING OF TEXT.
├ALL ADDRESS: $├148
╔NPUT REQUIREMENTS:
$02-$03 ╨OINTER TO TEXT STRING.
$05 ╘HE ROW FOR PRINTING (1 ABOVE THE UNDERLINE).
$18-$19 ╘HE COLUMN IN WHICH TO START PRINTING.
$33 ╘HE TOP MARGIN (╒SUALLY 0).
$34 ╘HE BOTTOM MARGIN (╒SUALLY 199).
$35-$36 ╘HE LEFT MARGIN.
$37-$38 ╘HE RIGHT MARGIN.
╨REPARATORY ROUTINES: ╙┼╠┬╙╫ OR ╞╧╬╘
┼RRORS: ┬RANCHES THROUGH $84┴┬-$84┴├ IF RIGHT MARGIN IS EXCEEDED.
─ESCRIPTION: ╘HIS ROUTINE CALLS ─╙╨├╚╥ TO DISPLAY EACH CHARACTER
IN A STRING. ╘HE STRING IS TERMINATED BY A ZERO BYTE.
╞UNCTION ╬AME: ┼╬┴┬╠┼
╨URPOSE: ┼NABLES A RECURRING TIMED EVENT.
├ALL ADDRESS: $├106
╔NPUT REQUIREMENTS:
╪ ╘HE INDEX INTO THE COMMAND TABLE AT $8719.
╨REPARATORY ROUTINES: ├═─╘┬╠
─ESCRIPTION: ╘HIS ROUTINE ENABLES A SPECIFIC TIMER IN THE TABLE
AT $8719 BY RESETTING BITS 5 AND 6 IN THE COMMAND TABLE. ╔T ALSO
COPIES THE INITIAL VALUE INTO THE TIMER TABLE AT $87╞1. ╘HE
COMMAND TABLE MUST HAVE BEEN PREVIOUSLY SET UP BY A CALL TO
├═─╘┬╠.
╟┼╧╙ ╦ERNAL ╥OUTINES 1-27
╞UNCTION ╬AME: ┼╥┴═╬╙
╨URPOSE: ┼RASES ALL OPEN MENUS.
├ALL ADDRESS: $├157
╨REPARATORY ROUTINES: ═┼╬╒
─ESCRIPTION: ╘HIS ROUTINE ERASES ALL OF THE MENUS. ╔T CALLS
┼╥┴═╬╒ REPEATEDLY TO ACCOMPLISH THIS. ╔T THEN SETS THE MENU LEVEL
COUNTER ($84┬7) TO $00.
╞UNCTION ╬AME: ┼╥┴═╬╒
╨URPOSE: ┼RASES THE CURRENT MENU FROM THE SCREEN.
├ALL ADDRESS: $├154
╨REPARATORY ROUTINES: ═┼╬╒
─ESCRIPTION: ╘HIS ROUTINE WILL ERASE THE CURRENT MENU. ╔T DOES
╬╧╘ POP UP A LEVEL. ╔T SIMPLY ERASES IT FROM THE SCREEN. ╔F THE
VECTOR AT $84┬1 WAS SET, THEN THAT IS THE ROUTINE CALLED TO ERASE
THE MENU; OTHERWISE, A BLANK PATTERN IS SELECTED WITH ╙┼╘╨┴╘ AND
╨╞╔╠╠ IS CALLED. ╘HE DEFAULT SETTING FOR $84┬1 IS ├╧╨┘┬.
╞UNCTION ╬AME: ┼╪┼╥╘╬
╨URPOSE: ╞ORCES A TIMED EVENT TO EXECUTE,REGARDLESS OF ITS TIMER.
├ALL ADDRESS: $├109
╔NPUT REQUIREMENTS:
╪ ╘HE INDEX INTO THE COMMAND BYTE TABLE AT $8719.
╨REPARATORY ROUTINES: ├═─╘┬╠
─ESCRIPTION: ╘HIS ROUTINE SETS BIT 7 OF A SPECIFIC COMMAND BYTE
IN THE TABLE AT $8719. ╘HIS SIMULATES THE TIMER HAVING RUN OUT.
╞UNCTION ╬AME: ╞┴╠╠╧├
╨URPOSE: ┴LLOCATE ENOUGH SECTORS FOR A FILE.
├ALL ADDRESS: $├1╞├
╔NPUT REQUIREMENTS:
$06-$07 ╬UMBER OF BYTES TO BE SAVED.
$0┴-$0┬ ┴DDRESS OF BUFFER FOR TRACK AND SECTOR LIST.
╧UTPUT:
┬UFFER IS FILLED WITH A SET OF TRACKS AND SECTORS.
┼RRORS: ╙EE ┴PPENDIX
─ESCRIPTION: ╟IVEN A BYTE COUNT AND A POINTER TO A BUFFER, THIS
ROUTINE ATTEMPTS TO ALLOCATE ENOUGH SECTORS. ╘HIS ROUTINE IS
CALLED PRIOR TO SAVING A FILE. ╘HE TRACK AND SECTOR LIST IS NOT
LIMITED IN LENGTH, AVAILABLE DISK SPACE NOT WITHSTANDING. ╘HE
LIST IS TERMINATED WITH A TRACK NUMBER OF ZERO AND THE
APPROPRIATE BYTE COUNT IN THE SECTOR LOCATION. ╬OTE IF AN ERROR
OCCURS DURING THE ALLOCATION, THE SECTORS ALREADY ALLOCATED ARE
NOT FREED UP. ┼ITHER THIS MUST BE DONE OR THE DISK MUST BE
VALIDATED.
╟┼╧╙ ╦ERNAL ╥OUTINES 1-28
╞UNCTION ╬AME: ╞┴╠╧├2
╨URPOSE: ┴LLOCATE ENOUGH SECTORS FOR A FILE.
├ALL ADDRESS: $├24─
╔NPUT REQUIREMENTS:
$06-$07 ╬UMBER OF BYTES TO BE SAVED.
$08 ╘RACK TO START LOOKING FROM.
$09 ╙ECTOR TO START LOOKING FROM.
$0┴-$0┬ ┴DDRESS OF BUFFER FOR TRACK AND SECTOR LIST.
╧UTPUT:
┬UFFER IS FILLED WITH A SET OF TRACKS AND SECTORS.
┼RRORS: ╙EE ┴PPENDIX
─ESCRIPTION: ╘HIS ROUTINE IS ALMOST IDENTICAL TO ╞┴╠╠╧├. ┴S A
MATTER OF FACT, ╞┴╠╠╧├ FALLS INTO THIS ROUTINE AFTER SETTING $08-
$09 TO POINT TO TRACK 1 SECTOR 0. ╘HIS ROUTINE ALLOWS THE USER TO
SPECIFY WHERE ON THE DISK TO START LOOKING FOR FREE SECTORS,
POSSIBLY SPEEDING THINGS UP.
╞UNCTION ╬AME: ╞╧╬╘
╨URPOSE: ├HANGE THE CURRENT FONT.
├ALL ADDRESS: $├1├├
╔NPUT REQUIREMENTS:
$02-$03 ╨OINTER TO FONT HEADER IN MEMORY.
╧UTPUT:
$26 # PIXELS ABOVE LINE OF PRINT.
$27-$28 ╘HE NUMBER OF BYTES IN THE BIT STREAM.
$29 ╘HE POINT SIZE.
$2┴-$2┬ ╨OINTER TO THE TABLE OF THE BIT STREAM INDICES.
$2├-$2─ ╨OINTER TO THE BIT STREAM.
─ESCRIPTION: ╘HIS ROUTINE SIMPLY COPIES THE HEADER BLOCK FROM THE
FONT TO ZERO PAGE. ╘HIS MAKES THE FONT THE CURRENT FONT FOR ALL
CHARACTER OUTPUT. (╙EE ─╙╨├╚╥, ─╙╨╘╪╘ AND ─╙╨╘╪2).
╞UNCTION ╬AME: ╞╧╥┬╔─
╨URPOSE: ─ISABLES THE EXECUTION OF A TIMED EVENT.
├ALL ADDRESS: $├10├
╔NPUT REQUIREMENTS:
╪ ╘HE INDEX INTO THE COMMAND TABLE AT $8719.
╨REPARATORY ROUTINES: ├═─╘┬╠
─ESCRIPTION: ╘HIS ROUTINE SETS BIT 6 OF A SPECIFIC COMMAND BYTE
IN THE TABLE AT $8719. ╘HIS PREVENTS THE ASSOCIATED ROUTINE FROM
EXECUTING, REGARDLESS OF ITS TIMER. ╘HIS DOES ╬╧╘ STOP THE TIMER
FROM RUNNING. ╔F THE TIMER RUNS OUT WHILE THE ROUTINE IS
DISABLED, WHEN THE TIMER IS REENABLED, THE ASSOCIATED ROUTINE
WILL BE EXECUTED. ╘HIS ROUTINE IS THE COMPLEMENT TO ╨┼╥═╔╘.
╟┼╧╙ ╦ERNAL ╥OUTINES 1-29
╞UNCTION ╬AME: ╞╥┼┼
╨URPOSE: ─EALLOCATES ALL OF A FILE'S SECTORS.
├ALL ADDRESS: $├226
╔NPUT REQUIREMENTS:
$14-$15 ╨OINTER TO DIRECTORY ENTRY.
╨REPARATORY ROUTINES: ╠╧╧╦╒╨ (╨OINTER MUST BE COPIED).
┼RRORS: ╙EE ┴PPENDIX ╔.
─ESCRIPTION: ╟IVEN THE DIRECTORY ENTRY OF A FILE, ALL OF ITS
SECTORS ARE RETURNED TO THE FREE POOL. ╘HE DIRECTORY POINTER
SHOULD BE POINTING TO THE DIRECTORY ENTRY AT $8400 AND NOT THE
POINTER RETURNED BY ╠╧╧╦╒╨. ╘HIS IS DUE TO MEMORY CONFLICTS THAT
WILL ARISE. ╘HIS ROUTINE USES $8000-$82╞╞ FOR ITS BUFFER AREAS.
╞UNCTION ╬AME: ╟┼╧╙├╦
╨URPOSE: ├HECKS IF A DISK IS ╟┼╧╙ FORMAT OR NOT.
├ALL ADDRESS: $├1─┼
╔NPUT REQUIREMENTS:
$0├-$0─ ╨OINTER TO BUFFER WITH TRACK 18 SECTOR 0.
╧UTPUT:
┌ ╙ET IF NON-╟┼╧╙, RESET IF ╟┼╧╙ FORMAT.
┴,$848┬ $00 IF NON-╟┼╧╙, $╞╞ IF ╟┼╧╙ FORMAT.
─ESCRIPTION: ╘HIS ROUTINE EXPECTS THAT TRACK 18 SECTOR 0 HAS
ALREADY BEEN READ. ╔T COMPARES 11 BYTES, STARTING WITH THE
173RD, AGAINST '╟┼╧╙ FORMAT'. ╔T SETS $848┬ SO THAT THE CURRENT
DRIVE IS KEPT TRACK OF.
╞UNCTION ╬AME: ╟┼╘┬┘╘
╨URPOSE: ╥EAD A BYTE FROM A FILE.
├ALL ADDRESS: $├2┬6
╔NPUT REQUIREMENTS:
$0├ ╔NDEX OF LAST BYTE IN BUFFER.
$0─ ╔NDEX TO NEXT CHARACTER IN BUFFER.
$0┴-$0┬ ╨OINTER TO DISK BUFFER.
╧UTPUT:
┴ ├HARACTER THAT WAS READ.
┼RRORS: ╙EE ┴PPENDIX ╔.
─ESCRIPTION: ╘HE INITIAL SECTOR MUST HAVE BEEN READ BECAUSE THE
FIRST TWO BYTES IN THE BUFFER ARE USED TO FIND THE NEXT TRACK AND
SECTOR. ┬YTES ARE READ FROM THE BUFFER UNTIL THERE ARE NO MORE,
THEN THE NEXT SECTOR IS READ FROM THE DISK. ╘HIS CAN CONTINUE
UNTIL THE LAST CHARACTER OF THE LAST SECTOR IS READ. ┴FTER THIS
AN ERROR 11 (┼ND OF FILE) WILL BE RETURNED.
╟┼╧╙ ╦ERNAL ╥OUTINES 1-30
╞UNCTION ╬AME: ╟┼╘╔╬
╨URPOSE: ╟ET A KEY FROM THE KEYBOARD.
├ALL ADDRESS: $├2┴7
╧UTPUT:
┴ ├HARACTER OR $00 IF THERE ARE NONE.
─ESCRIPTION: ╘HIS ROUTINE TAKES A KEY FROM THE KEYBOARD BUFFER,
IF THERE IS ONE. ╔F THERE ARE NO CHARACTERS IN THE BUFFER, THEN A
ZERO IS RETURNED.
╞UNCTION ╬AME: ╟╧╘╧
╨URPOSE: ╟ET A SPECIFIC ╓╠╔╥ CHAIN.
├ALL ADDRESS: $├280
╔NPUT REQUIREMENTS:
┴ ╓╠╔╥ CHAIN NUMBER.
╧UTPUT:
┘ ╘RACK OF ╓╠╔╥ CHAIN.
$04 ╘RACK OF ╓╠╔╥ CHAIN.
$05 ╙ECTOR OF ╓╠╔╥ CHAIN.
$8496 ╙ET TO ┴.
╨REPARATORY ROUTINES: ╓╧╨┼╬
┼RRORS: ╙EE ┴PPENDIX ╔.
─ESCRIPTION: ╘HIS ROUTINE GETS THE TRACK AND SECTOR OF A SPECIFIC
CHAIN IN THE OPEN ╓╠╔╥ FILE. ╔T DOES NOT CHECK TO SEE IF THE
CHAIN EXISTS (IE. TRACK IS ZERO). ╔T DOES CHECK IF THIS CHAIN IS
GREATER THAN ZERO AND LESS THAN THE NUMBER OF ╓╠╔╥ CHAINS
(╠OCATION $8497). ╓╠╔╥ CHAINS ARE NUMBERED FROM 0 TO ╬-1, WHERE ╬
IS THE NUMBER OF CHAINS.
╞UNCTION ╬AME: ╟╥╨╚├2
╨URPOSE: ╔DENTICAL TO ╟╥╨╚╔├, BUT WITH INLINE DATA.
├ALL ADDRESS: $├1┴8
─ESCRIPTION: ╘HIS ROUTINE TAKES AN INLINE DATA TABLE, CREATES A
POINTER TO IT, THEN CALLS ╟╥╨╚╔├ TO PROCESS IT. ╙EE ╨╞╔╠╠2 FOR AN
EXAMPLE OF INLINE DATA TABLES.
╞UNCTION ╬AME: ╟╥╨╚╔├
╨URPOSE: ╨ROCESS SEVERAL GRAPHICS COMMANDS DESIGNATED BY A TABLE.
├ALL ADDRESS: $├136
╔NPUT REQUIREMENTS:
$02-$03 ╨OINTER TO THE TABLE OF COMMANDS.
─ESCRIPTION: ╘HIS ROUTINE EXECUTES THE GRAPHIC COMMANDS PRESENT
IN A TABLE. ╘HIS ROUTINE IS USED BY ─╙╨├╚╥ (├ONTROL-╨),─╙╨╘╪╘ (┬Y
CALLING ─╙╨├╚╥), AND ╫╔╬─╧╫ (├OMMAND 15). ╘HE FOLLOWING TABLE
DESCRIBES THE AVAILABLE COMMANDS.
╟┼╧╙ ╦ERNAL ╥OUTINES 1-31
╟RAPHIC ├OMMAND ╘ABLE
├OMMAND #┬YTES ─ESCRIPTION
0 1 ╙TOP, END OF TABLE.
1 4 ╙ET COLUMN AND ROW VARIABLES.
2 4 ─RAW A LINE.
3 4 ╨ATTERN FILL A REGION.
4 1 ╬O OPERATION.
5 2 ╙ET FILL PATTERN.
6 4+ ╙ET POSITION AND DISPLAY TEXT. ═╒╙╘ ┬┼
LAST COMMAND BECAUSE THE ZERO BYTE THAT
ENDS THE TEXT ALSO ENDS THIS COMMAND
TABLE.
7 4 ─RAW A SOLID LINED BOX.
8 3 ┴DD AN OFFSET TO COLUMN VARIABLE.
9 2 ┴DD AN OFFSET TO ROW VARIABLE.
10 4 ┴DD OFFSETS TO BOTH COLUMN AND ROW
VARIABLES.
├OMMAND 1 IS USED TO SET THE COLUMN AND ROW VARIABLES USED BY ALL
OF THE OTHER COMMANDS WHICH REQUIRE TWO POINTS. ╘HE FORMAT OF THE
COMMANDS IS THAT ALL OF THE NECESSARY DATA FOLLOWS THE COMMAND
BYTE. ╞OR EXAMPLE, THE COMMANDS TO ERASE THE ENTIRE SCREEN WOULD
LOOK LIKE THIS:
.┬┘╘┼ $05,$00
.┬┘╘┼ $01
.╫╧╥─ 0
.┬┘╘┼ 0
.┬┘╘┼ $03
.╫╧╥─ 320
.┬┘╘┼ 199
.┬┘╘┼ $00
╔N THE CASE OF COMMAND 6, AFTER THE COLUMN AND ROW BYTES IN THE
COMMAND COMES THE TEXT THAT IS TO BE DISPLAYED. ╞OR EXAMPLE:
.┬┘╘┼ $06
.╫╧╥─ 50
.┬┘╘┼ 50
.┬┘╘┼ '╚ELLO WORLD!'
.┬┘╘┼ $00
╞UNCTION ╬AME: ╚╠╔╬┼
╨URPOSE: ─RAWS A HORIZONAL LINE ON THE SCREEN.
├ALL ADDRESS: $├118
╔NPUT REQUIREMENTS:
┴ ╘HE ACTUAL BIT PATTERN FOR THE LINE.
$08-$09 ╘HE LEFT MARGIN.
$0┴-$0┬ ╘HE RIGHT MARGIN.
$18 ╘HE ROW NUMBER.
─ESCRIPTION: ╘HIS ROUTINE DRAWS A HORIZONTAL LINE ON THE HIRES
SCREEN IN A GIVEN PATTERN. ╙EE ALSO ╥╧╫┴─╥.
╟┼╧╙ ╦ERNAL ╥OUTINES 1-32
╞UNCTION ╬AME: ╚╧╠┼
╨URPOSE: ╞IND A HOLE IN THE DIRECTORY, OR MAKE ONE.
├ALL ADDRESS: $├1╞6
╧UTPUT:
┘ ╔NDEX OF HOLE IN BUFFER.
$04 ─IRECTORY TRACK NUMBER (╙HOULD BE 18).
$05 ─IRECTORY SECTOR NUMBER.
$16 # DIRECTORY SECTORS TO SKIP FIRST.
$8000-$80╞╞ ┬UFFER FOR DIRECTORY SECTOR.
─ESCRIPTION: ╘HIS ROUTINE SCANS THE DISK'S DIRECTORY LOOKING FOR
A DELETED FILE, BY FIRST SKIPPING A CERTAIN NUMBER OF SECTORS.
╘HIS ALLOWS THE USER TO FIND A HOLE IN A GIVEN DIRECTORY PAGE.
╔F ONE IS NOT FOUND IN ANY OF THE AVAILABLE DIRECTORY SECTORS,
THEN A NEW SECTOR IS ADDED TO THE DIRECTORY.
╞UNCTION ╬AME: ╔╬─╩═╨
╨URPOSE: ├ONDITIONAL JUMP.
├ALL ADDRESS: $├1─8
╔NPUT REQUIREMENTS:
┴ ╘HE HIGH BYTE OF THE JUMP VECTOR.
╪ ╘HE LOW BYTE OF THE JUMP VECTOR.
─ESCRIPTION: ╔F ┴ AND ╪ ARE ZERO, THE JUMP IS NOT PERFORMED. ╔F ┴
AND ╪ ARE NONZERO, THE JUMP IS PERFORMED.
╞UNCTION ╬AME: ╔╬╔╘01
╨URPOSE: ╨ART OF ╟┼╧╙'S BOOTUP PROCESS.
├ALL ADDRESS: $├271
─ESCRIPTION: ╔NITIALIZES THE ╓╔├ CHIP AND THE ╔/╧ CHIPS. ╙OME
GLOBAL MEMORY IS ALSO INITIALIZED. ╔T ALSO RESETS THE
PREFERENCES AND ALL THE DRIVES. ╘HE DEFAULT DRIVE IS RESET BY A
CALL TO ─╙┼╘╒╨.
╞UNCTION ╬AME: ╔╬╔╘─╓
╨URPOSE: ╔NITIALIZES A DRIVE.
├ALL ADDRESS: $├1┼1
╔NPUT REQUIREMENTS:
$04 ╘RACK TO POSITION THE DISK DRIVE HEAD AT.
$05 ╙ECTOR TO POSITION THE DISK DRIVE HEAD AT.
┼RRORS: ╙EE ┴PPENDIX
─ESCRIPTION: ═AKES SURE THAT CURRENT DRIVE HAS TURBODOS RUNNING.
╔T ALSO POSITIONS THE HEAD OVER A PARTICULAR SECTOR.
╟┼╧╙ ╦ERNAL ╥OUTINES 1-33
╞UNCTION ╬AME: ╔╬╔╘═╙
╨URPOSE: ╔NITIALIZES THE MOUSE.
├ALL ADDRESS: $├14┼
╔NPUT REQUIREMENTS:
├ FLAG ├LEAR IF THE MOUSE POSITION SHOULD NOT BE SET.
├ FLAG ╙ET IF THE MOUSE POSITION SHOULD BE SET.
┘ ╘HE ROW POSITION FOR THE MOUSE (OPTIONAL).
$18-$19 ╘HE COLUMN POSITION FOR THE MOUSE (OPTIONAL).
─ESCRIPTION: ╘HIS ROUTINE TURNS ON THE MOUSE AND POSITIONS IT IF
DESIRED. ╔F THE COLUMN IS SET TO 0, THE MOUSE IS NOT POSITIONED
EVEN IS THE ├ FLAG IS SET. ╔T ALSO SETS UP THE BUTTON PRESSED
VECTOR $84┴1-$84┴2 AND THE CLOSE MENU VECTOR $84┴7-$84┴8. ╔T ALSO
CLEARS THE FLAG AT $84┬6. ╘HIS ROUTINE DOES NOT ACTUALLY TURN ON
THE MOUSE. ╔T CALLS ═╧╒╙╧╬ TO RESET BIT 7 OF LOCATION $30; THIS
WILL CAUSE ╟┼╧╙'S INTERRUPT ROUTINES TO TURN ON THE MOUSE.
╞UNCTION ╬AME: ╔╬╨╒╘
╨URPOSE: ╔NPUT A LINE OF TEXT FROM THE USER.
├ALL ADDRESS: $├1┬┴
╔NPUT REQUIREMENTS:
$02-$03 ┴DDRESS OF TEXT AND BUFFER.
$04 ╞LAG BYTE ($87─3).
$05 ╥OW TO PRINT TEXT ON (1 ABOVE THE UNDERLINE).
$06 ═AXIMUM LENGTH OF INPUT.
$0┴-$0┬ ╓ECTOR FOR USER ROUTINE FOR RIGHT MARGIN EXCEEDED
(OPTIONAL).
$18-$19 ├OLUMN TO START PRINTING TEXT AT.
$84┴3-$84┴4 ┴DDRESS FOR ├╥ ENTERED.
╧UTPUT:
$24-$25 ╨OINTER TO TEXT BUFFER (COPIED FROM $02-$03).
┬UFFER WILL BE MODIFIED ACCORDING TO THE USER'S INPUT.
$84┴3-$84┴4 ├LEARED TO $0000.
─ESCRIPTION: ╘HIS ROUTINE IS RATHER POWERFUL. ╔T DISPLAYS A LINE
OF TEXT, IF THERE WAS ANY TEXT TO DISPLAY. ╘HEN THE TEXT CURSOR
IS TURNED ON. ╙EVERAL OF THE JUMP VECTORS ARE USED.
$84┴┬-$84┴├ IS THE VECTOR FOR THE RIGHT MARGIN BEING EXCEEDED.
$84┴9-$84┴┴ IS THE VECTOR FOR A CHARACTER BEING TYPED. $84┴3-
$84┴4 IS THE VECTOR FOR ├╥ ENTERED. ┴FTER EVERYTHING IS SET UP,
CONTROL RETURNS TO THE CALLER; HOWEVER, THE INPUT IS HANDLED BY
THE INTERRUPT DRIVERS. ╫HEN A ├╥ IS ENTERED, CONTROL GOES THROUGH
THE VECTOR AT $84┴3-$84┴4. ╘HE FLAG BYTE AT LOCATION $04 IS
COPIED TO $87─3 AND HAS THE FOLLOWING PROPERTY: ╔F BIT 7 IS SET,
THEN USE THE USER'S ROUTINE WHOSE ADDRESS IS STORED AT LOCATIONS
$0┴-$0┬ FOR THE RIGHT MARGIN IS EXCEEDED ROUTINE.
╟┼╧╙ ╦ERNAL ╥OUTINES 1-34
╞UNCTION ╬AME: ╔╬╙┼╥╘
╨URPOSE: ╔NSERT A NEW CHAIN IN A ╓╠╔╥ FILE.
├ALL ADDRESS: $├286
╔NPUT REQUIREMENTS:
$8496 ├URRENT CHAIN NUMBER.
╧UTPUT:
$8497 ╔NCREMENTED BY 1.
╨REPARATORY ROUTINES: ╓╧╨┼╬
┼RRORS: ╙EE ┴PPENDIX ╔.
─ESCRIPTION: ┴ HOLE IS OPENED UP IN THE ╓╠╔╥ SECTOR STARTING WITH
THE CURRENT CHAIN. ╘HE HOLE IS FILLED WITH $00,$╞╞. ╘HIS
REPRESENTS A NULL CHAIN.
╞UNCTION ╬AME: ╔╬╘┬═
╨URPOSE: ╔NTELLIGENT BLOCK MOVE.
├ALL ADDRESS: $├17┼
╔NPUT REQUIREMENTS:
$02-$03 ╘HE SOURCE ADDRESS.
$04-$05 ╘HE DESTINATION ADDRESS.
$06-$07 ╘HE LENGTH OF THE REGION TO BE MOVED.
─ESCRIPTION: ╘HIS ROUTINE WILL PERFORM AN INTELLIGENT, IE.
NONCONFLICTING, BLOCK MOVE OF MEMORY. ╔F AN ATTEMPT IS MADE TO
MOVE A BLOCK OF MEMORY TO A DESTINATION THAT IS WITHIN THE BLOCK,
THE TRANSFER IS DONE FROM BACK TO FRONT SO AS TO PREVENT THE
CONFLICT, OR 'RIPPLE EFFECT'.
╞UNCTION ╬AME: ╔╬╘┬═2
╨URPOSE: ╔DENTICAL TO ╔╬╘┬═, BUT WITH INLINE DATA.
├ALL ADDRESS: $├1┬7
─ESCRIPTION: ╘HIS ROUTINE USES THE INLINE DATA TO SET EVERYTHING
UP BEFORE CALLING ╔╬╘┬═. ╞OR EXAMPLE:
╩╙╥ ╔╬╘┬═2
.╫╧╥─ ╙OURCE ADDRESS
.╫╧╥─ ─ESTINATION ADDRESS
.╫╧╥─ ╠ENGTH OF TRANSFER
├ONTROL RETURNS HERE UPON COMPLETION.
╟┼╧╙ ╦ERNAL ╥OUTINES 1-35
╞UNCTION ╬AME: ╔╬╒╙┼
╨URPOSE: ├HECK IF A DISK SECTOR IS IN USE.
├ALL ADDRESS: $├2┴─
╔NPUT REQUIREMENTS:
$0┼ ╘RACK TO BE CHECKED.
$0╞ ╙ECTOR TO BE CHECKED.
$8200-$82╞╞ ╘RACK 18 SECTOR 0, ┬┴═ BUFFER.
╧UTPUT:
╪ ╔NDEX INTO ┬┴═ OF THE APPROPRIATE BYTE.
┌ FLAG ╙ET IF THE SECTOR IS IN USE.
$11 ╔NDEX TO TRACK'S DATA IN ┬┴═.
$13 ┬IT MASK FOR THE DESIRED SECTOR.
╨REPARATORY ROUTINES: ╥─180
─ESCRIPTION: ╘HIS ROUTINE IS USED BY ┴╠╠╧├ TO TEST IF A SECTOR IS
ALREADY IN USE.
╞UNCTION ╬AME: ╔╬╓┬╧╪
╨URPOSE: ╔NVERTS THE PIXELS IN A BOX.
├ALL ADDRESS: $├12┴
╔NPUT REQUIREMENTS:
$06 ╘HE TOP MARGIN.
$07 ╘HE BOTTOM MARGIN.
$08-$09 ╘HE LEFT MARGIN.
$0┴-$0┬ ╘HE RIGHT MARGIN.
─ESCRIPTION: ╘HIS ROUTINE REVERSES THE PIXELS IN A GIVEN BOX BY
REPEATEDLY CALLING ╔╬╓╠╔╬. ╙EE ALSO ╥╧╫┴─╥.
╞UNCTION ╬AME: ╔╬╓╠╔╬
╨URPOSE: ╔NVERTS A HORIZONAL LINE ON THE SCREEN.
├ALL ADDRESS: $├11┬
╔NPUT REQUIREMENTS:
$08-$09 ╘HE LEFT MARGIN.
$0┴-$0┬ ╘HE RIGHT MARGIN.
$18 ╘HE ROW NUMBER.
─ESCRIPTION: ╘HIS ROUTINE REVERSES THE PIXELS ON A HORIZONTAL
LINE ON THE HIRES SCREEN. ╔F THE PIXEL WAS ON IT WILL NOW BE OFF;
IF IT WAS OFF IT WILL NOW BE TURNED ON. ╙EE ALSO ╥╧╫┴─╥.