home *** CD-ROM | disk | FTP | other *** search
- ╞╞├9 ▄ ├╚╦╧╒╘ ▄ * * * * ▄ ╙ET OUTPUT CHANNEL ▄ ***
- ╞╞├├ ▄ ├╠╥├╚ ▄ * * ▄ ╥ESTORE DEFAULT CHANNELS ▄ ***
- ╞╞├╞ ▄ ┬┴╙╔╬ ▄ * * ▄ ╔NPUT FROM CHANNEL ▄ ***
- ╞╞─2 ▄ ┬╙╧╒╘ ▄ * * ▄ ╧UTPUT TO CHANNEL (AKA ├╚╥╧╒╘) ▄*** ***
- ╞╞─5 ▄ ╠╧┴─ ▄ * * * * ▄ ╠OAD DATA FROM FILE ▄ ***
- ╞╞─8 ▄ ╙┴╓┼ ▄ * * * * ▄ ╙AVE DATA TO FILE ▄ ***
- ╞╞─┬ ▄ ╙┼╘╘╔═ ▄ ▄ ╙ETS INTERNAL (╘╔$) CLOCK ▄ ***
- ╞╞─┼ ▄ ╥─╘╔═ ▄ * * * ▄ ╥EADS INTERNAL (╘╔$) CLOCK ▄ ***
- ╞╞┼1 ▄ ╙╘╧╨ ▄ * * ▄ ╙CANS AND CHECK FOR ╙╘╧╨ KEY ▄ ***
- ╞╞┼4 ▄ ╟┼╘╔╬ ▄ * * * * ▄ ╥EADS BUFFERED DATA FROM FILE ▄ ***
- ╞╞┼7 ▄ ├╠┴╠╠ ▄ * * ▄ ├LOSE ALL OPEN FILES AND CHANNELS ▄ ***
- ╞╞┼┴ ▄ ╒─╘╔═ ▄ * * ▄ ╒PDATES INTERNAL (╘╔$) CLOCK ▄ ***
- ╞╞┼─ ▄ ╙├╥╧╥╟ ▄ * * * ▄ ╥ETURNS CURRENT WINDOW/SCREEN SIZE ▄***
- ╞╞╞0 ▄ ╨╠╧╘ ▄ * * * ▄ ╥EAD OR SET CURSOR POSITION ▄***
- ╞╞╞3 ▄ ╔╧┬┴╙┼ ▄ * * ▄ ╥EAD BASE OF ╔/╧ BLOCK ▄ ***
- --------+---------+---------+---------------------------------------+-----------
-
-
- +--------------------------+
- ▄ ╘HE ╥OUTINES ╘HEMSELVES. ▄
- +--------------------------+
-
- ┴. ┼RROR HANDLING
-
- ╞OR THE ROUTINES IN THE ╦┼╥╬┴╠ THAT RETURN STATUS CODES (INDICATED BY THE ╞╠
- STATUS IN THE CHART) THE CARRY IS SET IF THERE IS AN ERROR. ╧THERWISE, THE
- CARRY RETURNED IS CLEAR. ╔F THE CARRY IS SET, THE ERROR CODE IS RETURNED IN THE
- ACCUMALATOR:
- +-----------------------------------+
- .┴ ▄═EANING ▄ ╬╧╘┼: ╙OME OF THE ╔/╧ ROUTINES ▄
- ----+------------------------------ ▄ INDICATE THE ERROR CODE VIA ▄
- 0 ▄ ╙TOP ╦EY PRESSED ▄ THE ╥┼┴─╙╘ ROUTINE WHEN ▄
- 1 ▄ ╘OO ═ANY ╧PEN ╞ILES ▄ SETTING THE CARRY. ▄
- 2 ▄ ╞ILE ┴LREADY ╧PEN +------------------------------------
- 3 ▄ ╞ILE ╬OT ╧PEN
- 4 ▄ ╞ILE ╬OT ╞OUND
- 5 ▄ ─EVICE ╬OT ╨RESENT
- 6 ▄ ╞ILE ╫AS ╬OT ╧PENED ┴S ╔NPUT
- 7 ▄ ╞ILE ╫AS ╬OT ╧PENED ┴S ╧UTPUT
- 8 ▄ ╞ILE ╬AME ╬OT ╨RESENT
- 9 ▄ ╔LLEGAL ─EVICE ╬UMBER
- 41 ▄ ╞ILE ╥EAD ┼RROR
-
-
- ┬. ─EVICE ╬UMBERS:
-
- ╘HE FOLLOWING TABLE LISTS THE "STANDARD" DEVICE NUMBERS USED BY THE ├= ╦ERNAL.
-
- +---------+----------------------------+
- ▄─EVICE # ▄ ─EVICE ╬AME ▄
- +---------+----------------------------+
- ▄ 0 ▄ ╦EYBOARD (STANDARD INPUT) ▄
- ▄ 1 ▄ ├ASSETTE ▄
- ▄ 2 ▄ ╥╙-232 ▄
- ▄ 3 ▄ ╙CREEN (STANDARD OUTPUT) ▄
- ▄ 4 - 30▄ ╙ERIAL ┬US ─EVICES ▄
- ▄ 4-7 ▄ ╨RINTERS (TYPICALLY)▄
- ▄ 8-30▄ ─ISK ─RIVES (TYPICALLY)▄
- +---------+----------------------------+
-
- ├. ╥OUTINE ─ESCRIPTIONS.
-
- ─UE TO SPACE LIMITATIONS A FULLY-DETAILED, DESCRIPTIVE SUMMARY OF THE ╦┼╥╬┴╠
- ROUTINES IS NOT FEASIBLE. ╚OWEVER, LISTED BELOW IS A DESCRIPTION OF WHAT EACH
- ROUTINE DOES, EXPECTED PARAMETERS AND ANY NOTES ON ├=128/├=64 DIFFERENCES AS
- WELL AS NOTES TO CLARIFY ANY POSSIBLY CONFUSING DETAILS.
-
- ---------------------------------------------------------------------------
-
- ╥OUTINE : ╙╨╔╬╙╨╧╒╘ ** 128 ╧╬╠┘ **
- ╦ERNAL ┴DDRESS: $╞╞47
- ─ESCRIPTION : ╙ETUP ├╔┴ FOR ┬╒╥╘ PROTOCOL.
- ╥EGISTERS ╔N : .├ = 0 -> ╙╨╔╬╨ (INPUT)
- .├ = 1 -> ╙╨╧╒╘ (OUTPUT)
- ╥EGISTERS ╧UT : .┴ DESTROYED
- ═EMORY ├HANGED: ├╔┴, ══╒.
-
- ╥OUTINE : ├╠╧╙┼┴╠╠ ** 128 ╧╬╠┘ **
- ╦ERNAL ┴DDRESS: $╞╞4┴
- ─ESCRIPTION : ├LOSE ALL FILES ON A DEVICE.
- ╥EGISTERS ╔N : .┴ = DEVICE # (0-31)
- ╥EGISTERS ╧UT : .┴, .╪, .┘ USED.
- ═EMORY ├HANGED: ╬ONE.
-
- ╥OUTINE : ├64═╧─┼ ** 128 ╧╬╠┘ **
- ╦ERNAL ┴DDRESS: $╞╞4─
- ─ESCRIPTION : ╙WITCHES TO ├64 ═ODE
- ╥EGISTERS ╔N : ╬ONE.
- ╥EGISTERS ╧UT : ╬ONE.
- ═EMORY ├HANGED: -┴╠╠- ╘HIS ROUTINE INITIALIZES AND CALLS THE ├64 COLD START
- ROUTINE. ╘HERE IS NO WAY TO SWITCH OUT OF ├64 MODE ONCE THIS
- ROUTINE IS ENTERED.
-
- ╥OUTINE : ─═┴├┴╠╠ ** 128 ╧╬╠┘ **
- ╦ERNAL ┴DDRESS: $╞╞50
- ─ESCRIPTION : ╨ERFORM ─═┴ COMMAND (FOR ╥┼╒)
- ╥EGISTERS ╔N : .╪ = ┬ANK, .┘ = ─═┴ CONTROLLER COMMAND
- ╬╧╘┼: ╥┼╒ REGISTERS MUST HAVE BEEN PREVIOUSLY SETUP.
- ╥EGISTERS ╧UT : .┴, .╪ USED
- ═EMORY ├HANGED: ─EPENDENANT UPON ╥┼╒ REGISTERS, ╥┼╒ COMMAND.
-
- ╥OUTINE : ┬╧╧╘├┴╠╠ ** 128 ╧╬╠┘ **
- ╦ERNAL ┴DDRESS: $╞╞53
- ─ESCRIPTION : ┴TTEMPTS TO LOAD AND EXECUTE BOOT SECTOR FROM A DRIVE.
- ╥EGISTERS ╔N : .┴ = DRIVE # IN ASCII (USUALLY '0' / $30)
- .╪ = DEVICE #
- ╥EGISTERS ╧UT : .┴, .╪, .┘ USED. .├ = 1 IF ╔/╧ ERROR.
- ═EMORY ├HANGED: ┴S PER BOOT SECTOR.
-
- ╥OUTINE : ╨╚╧┼╬╔╪ ** 128 ╧╬╠┘ **
- ╦ERNAL ┴DDRESS: $╞╞56
- ─ESCRIPTION : ╔NITALIZES EXTERNAL / INTERNATAL CARTRIDGES,CHECK FOR DISK BOOT
- ╥EGISTERS ╔N : ╬ONE.
- ╥EGISTERS ╧UT : .┴, .╪, .┘ USED.
- ═EMORY ├HANGED: ├ALLS ANY AUTO-START CATRIDGES THAT ARE INSTALLED ON THE SYSTEM
-
- ╥OUTINE : ╠╦╒╨╠┴ ** 128 ╧╬╠┘ **
- ╦ERNAL ┴DDRESS: $╞╞59
- ─ESCRIPTION : ╙EARCH FILE TABLES FOR A GIVEN LOGICAL DEVICE #.
- ╥EGISTERS ╔N : .┴ = ╠OGICAL ─EVICE #.
- ╥EGISTERS ╧UT : .├ = 0 IF FOUND -> .┴ = ╠OGICAL ─EVICE #,
- .╪ = ╠OGICAL ╞ILE #,
- .┘ = ╠OGICAL ╙ECONDARY #.
- .├ =1 IF NOT FOUND.
- ═EMORY ├HANGED: ╬ONE.
-
- ╥OUTINE : ╠╦╒╨╙┴ ** 128 ╧╬╠┘ **
- ╦ERNAL ┴DDRESS: $╞╞5├
- ─ESCRIPTION : ╙EARCH FILE TABLES FOR A GIVEN SECONDARY ADDRESS.
- ╥EGISTERS ╔N : .┘ = ╙ECONDARY ADDRESS TO SEARCH FOR.
- ╥EGISTERS ╧UT : ┴S ╠╦╒╨╠┴ (SEE ╠╦╒╨╠┴).
- ═EMORY ├HANGED: ╬ONE.
-
- ╥OUTINE : ╙╫┴╨╨┼╥ ** 128 ╧╬╠┘ **
- ╦ERNAL ┴DDRESS: $╞╞5╞
- ─ESCRIPTION : ╙WITCHES BETWEEN 40 / 80 COLUMN SCREEN.
- ╥EGISTERS ╔N : ╬ONE.
- ╥EGISTERS ╧UT : .┴, .╪, .┘ DESTROYED.
- ═EMORY ├HANGED: ╙CREEN ┼DITOR ╠OCATIONS.
-
- ╥OUTINE : ─╠├╚┴╥ ** 128 ╧╬╠┘ **
- ╦ERNAL ┴DDRESS: $╞╞62
- ─ESCRIPTION : ╔NITIALIZES 80 COLUMN CHARACTER SET.
- ╥EGISTERS ╔N : ╬ONE.
- ╥EGISTERS ╧UT : .┴, .╪, .┘ DESTROYED.
- ═EMORY ├HANGED: ╬ONE.
-
- ╥OUTINE : ╨╞╦┼┘ ** 128 ╧╬╠┘ **
- ╦ERNAL ┴DDRESS: $╞╞65
- ─ESCRIPTION : ╔NSTALLS A FUNCTION KEY DEFINITION
- ╥EGISTERS ╔N : .┴ = POINTER TO ┌-╨ ADDRESS (3 BYTES : ADDRESS LO/HI/BANK.)
- .┘ = LENGTH, .╪ = KEY # (9 = ╙HIFT ╥╒╬/╙╘╧╨, 10 = ╚┼╠╨).
- ╥EGISTERS ╧UT : .├ = 1 IF ╬O ROOM, .├ = 0 IF SUCCESSFUL.
- .┴, .╪, .┘ DESTROYED.
- ═EMORY ├HANGED: ╞UNCTION ╦EY ╘ABLE MODIFIED.
-
- ╥OUTINE : ╙┼╘┬╬╦ ** 128 ╧╬╠┘ **
- ╦ERNAL ┴DDRESS: $╞╞68
- ─ESCRIPTION : ╙ETS BANK FOR ANY FUTURE ╔/╧ OPERATIONS
- ╥EGISTERS ╔N : .┴ = ═EMORY ┬ANK, .╪ = ┬ANK WHERE FILENAME IS.
- ╥EGISTERS ╧UT : ╬ONE.
- ═EMORY ├HANGED: ╬ONE.
-
- ╥OUTINE : ╟┼╘├╞╟ ** 128 ╧╬╠┘ **
- ╦ERNAL ┴DDRESS: $╞╞6┬
- ─ESCRIPTION : ╟ET ══╒ CONFIGURATION FOR A GIVEN BANK.
- ╥EGISTERS ╔N : ╬ONE.
- ╥EGISTERS ╧UT : ╬ONE.
- ═EMORY ├HANGED:
-
- ╥OUTINE : ╩╙╥╞┴╥ ** 128 ╧╬╠┘ **
- ╦ERNAL ┴DDRESS: $╞╞6┼
- ─ESCRIPTION : ╩UMPS TO A SUBROUTINE IN ANOTHER BANK.
- ╥EGISTERS ╔N : ╬ONE. (╙EE ╩═╨╞┴╥ FOR MEM LOCATIONS ╔╬)
- ╥EGISTERS ╧UT : ╬ONE. (╙EE ╩═╨╞┴╥ FOR MEM LOCATIONS ╧╒╘)
-
- ╥OUTINE : ╩═╨╞┴╥ ** 128 ╧╬╠┘ **
- ╦ERNAL ┴DDRESS: $╞╞71
- ─ESCRIPTION : ╙TARTS EXECUTING CODE IN ANOTHER BANK.
- ╥EGISTERS ╔N : ╬ONE.
- ═EMORY ╔N : $02 - ┬ANK (0-15)
- $03 - ╨├ HIGH
- $04 - ╨├ LO
- $05 - .╙ (╨ROCESSOR STATUS)
- $06 - .┴
- $07 - .╪
- $08 - .┘
- ╥EGISTERS ╧UT : ╬ONE.
- ═EMORY ╧UT : ┴S MEMORY IN.
-
- ╥OUTINE : ╔╬─╞┼╘ ** 128 ╧╬╠┘ **
- ╦ERNAL ┴DDRESS: $╞╞74
- ─ESCRIPTION : ┼XECUTE A ╠─┴(FETVEC),┘ FROM A BANK.
- ╥EGISTERS ╔N : .┴ - POINTER TO ┌-╨AGE LOCATION HOLDING ADDRESS
- .╪ - ┬ANK (0-15), .┘ - ╔NDEX.
- ╥EGISTERS ╧UT : .┴ = DATA, .╪ - DESTROYED.
- ═EMORY ├HANGED: ╬ONE.
-
- ╥OUTINE : ╔╬─╙╘┴ ** 128 ╧╬╠┘ **
- ╦ERNAL ┴DDRESS: $╞╞77
- ─ESCRIPTION : ┼XECUTE A ╙╘┴(STAVEC),┘ IN A BANK.
- ╥EGISTERS ╔N : .┴ - POINTER TO ┌-╨AGE LOCATION HOLDING ADDRESS
- .╪ - ┬ANK (0-15), .┘ - ╔NDEX.
- ╥EGISTERS ╧UT : .╪ - ─ESTROYED.
- ═EMORY ├HANGED: ┴S PER REGISTERS.
-
- ╥OUTINE : ╔╬─├═╨ ** 128 ╧╬╠┘ **
- ╦ERNAL ┴DDRESS: $╞╞7┴
- ─ESCRIPTION : ┼XECUTES A ├═╨(CMPVEC),┘ IN A BANK.
- ╥EGISTERS ╔N : .┴ = DATA, .╪ = ┬ANK (0-15), .┘ - ┌-╨AGE PTR.
- ╥EGISTERS ╧UT : .╪ DESTROYED, ╞LAGS SET ACCORDINGLY.
- ═EMORY ├HANGED: ╬ONE.
-
- ╥OUTINE : ╨╥╔══ ** 128 ╧╬╠┘ **
- ╦ERNAL ┴DDRESS: $╞╞7─
- ─ESCRIPTION : ╨RINTS NULL TERMINATED STRING FOLLOWING ╩╙╥ TO CURRENT CHANNEL
- ╥EGISTERS ╔N : ╬ONE.
- ╥EGISTERS ╧UT : ╬ONE.
- ═EMORY ├HANGED: ─EPENDENT UPON CURRENT DEVICE.
- ┼XAMPLE :
- [ . . . ]
- ╩╙╥ $╞╞7─ ; ╩╙╥ TO PRIMM, / PRINT FOLLOWING STRING.
- .┴╙├ "╚I ╫ORLD!" ; ╙TRING TO PRINT.
- .┬┘╘ $00 ; ╔═╨╧╥╘┴╬╘: ╬ULL ╘ERMINATED.
- [ . . . ]
-
- ---------------------------------------------------------------------------
-
- ╥OUTINE : ├╔╬╘
- ╦ERNAL ┴DDRESS: $╞╞81
- ─ESCRIPTION : ╙ETUP ╓╔├, SCREEN VALUES, (128: 8563)...
- ╥EGISTERS ╔N : ╬ONE.
- ╥EGISTERS ╧UT : ╬ONE.
- ═EMORY ├HANGED: ╙CREEN ┼DITOR ╠OCATIONS.
-
- ╥OUTINE : ╔╧╔╬╔╘
- ╦ERNAL ┴DDRESS: $╞╞84
- ─ESCRIPTION : ╔NITIALIZES PERTINANT DISPLAY AND I/O DEVICES
- ╥EGISTERS ╔N : ├64: ╬ONE. ▄ ├128: $0┴04/BIT 7
- ▄ 0 - ╞ULL ╙ETUP.
- ▄ 1 - ╨ARTIAL ╙ETUP. (NO 8563 CHAR)
- ╥EGISTERS ╧UT : .┴, .╪, .┘ DESTROYED.
- ═EMORY ├HANGED: ├╔┴'S, ╓╔├, 8502 PORT, (├128: ALSO OPTIONALLY 8563).
- ╬OTE : ╘HIS ROUTINE AUTOMATICALLY DISTINGUISHES A ╨┴╠ SYSTEM FROM A
- ╬╘╙├ SYSTEM AND SETS ╨┴╠├╬╘ ACCORDINGLY FOR USE IN THE
- TIME ROUTINES.
-
- ╥OUTINE : ╥┴═╘┴╙
- ╦ERNAL ┴DDRESS: $╞╞87
- ─ESCRIPTION : ├LEARS ┌-╨AGE, ╙ETS ╥╙-232 BUFFERS, TOP/BOT ╥AM.
- ╥EGISTERS ╔N : ╬ONE.
- ╥EGISTERS ╧UT : .┴, .╪, .┘ DESTROYED.
- ═EMORY ├HANGED: ┌-╨AGE, ╥S-232 BUFFERS, TOP/BOT ╥AM PTRS
-
- ╥OUTINE : ╓┼├╘╧╥
- ╦ERNAL ┴DDRESS: $╞╞8─
- ─ESCRIPTION : ├OPIES / ╙TORES ╦┼╥╬┴╠ INDIRECT ╥┴═ VECTORS.
- ╥EGISTERS ╔N : .├ = 0 (╙ET ╦┼╥╬┴╠ ╓ECTORS) ▄ .├ = 1 (─UPLICATE ╦┼╥╬┴╠ VECTORS)
- .╪┘ = ADDRESS OF VECTORS ▄ .╪┘ = ADDRESS OF USER VECTORS
- ╥EGISTERS ╧UT : .┴, .┘ DESTROYED ▄ .┴, .┘ DESTROYED.
- ═EMORY ├HANGED: ╦┼╥╬┴╠ ╓ECTORS CHANGED ▄ ╓ECTORS WRITTEN TO .╪┘
- ╬OTE : ╘HIS ROUTINE IS RARELY USED, USUALLY THE VECTORS ARE DIRECTLY
- CHANGED THEMSELVES. ╘HE VECTORS, IN ORDER, ARE :
-
- ├128: ╔╥╤,┬╥╦,╬═╔,╧╨┼╬,├╠╧╙┼,├╚╦╔╬,├╚╦╧╒╘,├╠╥├╚,┬┴╙╔╬,┬╙╧╒╘
- ╙╘╧╨,╟┼╘╔╬,├╠┴╠╠,┼╪═╧╬ (MONITOR),╠╧┴─,╙┴╓┼
- ├64 : ╔╥╤,┬╥╦,╬═╔,╧╨┼╬,├╠╧╙┼,├╚╦╔╬,├╚╦╧╒╘,├╠╥├╚,┬┴╙╔╬,┬╙╧╒╘
- ╙╘╧╨,╟┼╘╔╬,├╠┴╠╠,╒╙╥├═─ (NOT USED),╠╧┴─,╙┴╓┼
-
- ╥OUTINE : ╙┼╘═╙╟
- ╦ERNAL ┴DDRESS: $╞╞90
- ─ESCRIPTION : ╙ET CONTROL OF ╦┼╥╬┴╠ CONTROL AND ERROR MESSAGES.
- ╥EGISTERS ╔N : .┴ BIT 7 = ╦┼╥╬┴╠ ├ONTROL ═ESSAGES (1 = ON)
- BIT 6 = ╦┼╥╬┴╠ ┼RROR ═ESSAGES (1 = ON)
- ╥EGISTERS ╧UT : ╬ONE.
- ╬OTE : ╦┼╥╬┴╠ ├ONTROL MESSAGES ARE THOSE DEFINED AS ╠OADING, ╞OUND ETC
- ... ╦┼╥╬┴╠ ┼RROR MESSAGES ARE ╔/╧ ┼╥╥╧╥ # MESSAGES WHICH ARE
- LISTED AS FOLLOWS:
-
- ╥OUTINE : ╙┼├╬─
- ╦ERNAL ┴DDRESS: $╞╞93
- ─ESCRIPTION : ╙ENDS SECONDARY ADDRESS TO DEVICE AFTER A ╠╔╙╘╬
- ╥EGISTERS ╔N : .┴ = SECONDARY ADDRESS
- ╥EGISTERS ╧UT : .┴ USED.
- ═EMORY ├HANGED: ╬ONE.
- ╬OTE : ╠OW LEVEL SERIAL ╔/╧ - RECOMMENDED USE ╧╨┼╬,├╠╧╙┼,├╚╥╧╒╘ ETC..
-
- ╥OUTINE : ╘╦╙┴
- ╦ERNAL ┴DDRESS: $╞╞96
- ─ESCRIPTION : ╙ENDS SECONDARY ADDRESS TO DEVICE AFTER ╘┴╠╦
- ╥EGISTERS ╔N : .┴ = SECONDARY ADDRESS.
- ╥EGISTERS ╧UT : .┴ USED.
- ═EMORY ├HANGED: ╬ONE.
- ╬OTE : ╠OW LEVEL SERIAL ╔/╧ - RECOMMENDED USE ╧╨┼╬,├╠╧╙┼,├╚╥╧╒╘ ETC..
-
- ╥OUTINE : ═┼═╘╧╨
- ╦ERNAL ┴DDRESS: $╞╞99
- ─ESCRIPTION : ╥EAD OR ╙ET TOP OF ╙YSTEM ╥AM
- ╥EGISTERS ╔N : .├ = 1 (╥EAD ═EM╘OP) ▄ .├ = 0 (╙ET ═EM╘OP)
- ▄ .╪┘ = TOP OF MEMORY
- ╥EGISTERS ╧UT : .╪┘ = TOP OF MEMORY ▄ ╬ONE.
- ═EMORY ├HANGED: ╬ONE. ▄ ╘OP OF MEMORY CHANGED.
- ╬OTE : ╧N THE ├=128, THIS ROUTINE REFERS TO THE TOP OF ┬┴╬╦ 0 ╥┴═, NOT
- ┬┴╬╦ 1 ╥┴═.
-
- ╥OUTINE : ═┼═┬╧╘
- ╦ERNAL ┴DDRESS: $╞╞9├
- ─ESCRIPTION : ╥EAD OR ╙ET BOTTOM OF ╙YSTEM ╥AM
- ╥EGISTERS ╔N : .├ = 1 (╥EAD ═EM┬OT) ▄ .├ = 0 (╙ET ═EM┬OT)
- ▄ .╪┘ = BOTTOM OF MEMORY.
- ╥EGISTERS ╧UT : .╪┘ = BOTTOM OF MEMORY ▄ ╬ONE.
- ═EMORY ├HANGED: ╬ONE. ▄ ┬OTTOM OF ═EMORY CHANGED.
- ╬OTE : ╧N THE ├=128, THIS ROUTINE REFERS TO THE BOTTOM OF ┬┴╬╦ 0 ╥┴═,
- NOT, ┬┴╬╦ 1 ╥┴═.
-
- ╥OUTINE : ╦┼┘
- ╦ERNAL ┴DDRESS: $╞╞9╞
- ─ESCRIPTION : ╙CANS ╦EYBOARD
- ╥EGISTERS ╔N : ╬ONE.
- ╥EGISTERS ╧UT : ╬ONE.
- ═EMORY ├HANGED: ╥ELEVANT ╙YSTEM ╦EYBOARD ╓ALUES
-
- ╥OUTINE : ╙┼╘═╧
- ╦ERNAL ┴DDRESS: $╞╞┴2
- ─ESCRIPTION : ╘HIS IS A ROUTINE WHO'S CODE NEVER MADE IT INTO ANY VERSIONS
- OF THE ╦┼╥╬┴╠ ON THE ├64, ╓IC-20 AND ├128. ╘HUS IT IS OF NO
- PRATICAL USE.
-
- ╥OUTINE : ┴├╨╘╥
- ╦ERNAL ┴DDRESS: $╞╞┴5
- ─ESCRIPTION : ╟ET BYTE FROM CURRENT TALKER.
- ╥EGISTERS ╔N : ╬ONE.
- ╥EGISTERS ╧UT : .┴ = DATA BYTE.
- ═EMORY ├HANGED: ╬ONE.
- ╬OTE : ╠OW LEVEL SERIAL ╔/╧ - RECOMMENDED USE ╧╨┼╬,├╠╧╙┼,├╚╥╧╒╘ ETC..
-
- ╥OUTINE : ├╔╧╒╘
- ╦ERNAL ┴DDRESS: $╞╞┴8
- ─ESCRIPTION : ╧UTPUT BYTE TO CURRENT LISTENER.
- ╥EGISTERS ╔N : .┴ = BYTE.
- ╥EGISTERS ╧UT : .┴ USED.
- ═EMORY ├HANGED: ╬ONE.
- ╬OTE : ╠OW LEVEL SERIAL ╔/╧ - RECOMMENDED USE ╧╨┼╬,├╠╧╙┼,├╚╥╧╒╘ ETC..
-
- ╥OUTINE : ╒╬╘╠╦
- ╦ERNAL ┴DDRESS: $╞╞┴┬
- ─ESCRIPTION : ├OMMANDS CURRENT ╘┴╠╦ DEVICE TO STOP ╘┴╠╦╔╬╟.
- ╥EGISTERS ╔N : ╬ONE.
- ╥EGISTERS ╧UT : .┴ USED.
- ═EMORY ├HANGED: ╬ONE.
- ╬OTE : ╠OW LEVEL SERIAL ╔/╧ - RECOMMENDED USE ╧╨┼╬,├╠╧╙┼,├╚╥╧╒╘ ETC..
-
- ╥OUTINE : ╒╬╠╙╬
- ╦ERNAL ┴DDRESS: $╞╞┴┼
- ─ESCRIPTION : ├OMMANDS CURRENT LISTENING DEVICE TO STOP LISTENING.
- ╥EGISTERS ╔N : ╬ONE.
- ╥EGISTERS ╧UT : .┴ USED.
- ═EMORY ├HANGED: ╬ONE.
- ╬OTE : ╠OW LEVEL SERIAL ╔/╧ - RECOMMENDED USE ╧╨┼╬,├╠╧╙┼,├╚╥╧╒╘ ETC..
-
- ╥OUTINE : ╠╔╙╘╬
- ╦ERNAL ┴DDRESS: $╞╞┬1
- ─ESCRIPTION : ├OMMANDS DEVICE TO BEGIN LISTENING.
- ╥EGISTERS ╔N : .┴ = DEVICE #.
- ╥EGISTERS ╧UT : .┴ USED.
- ╬OTE : ╠OW LEVEL SERIAL ╔/╧ - RECOMMENDED USE ╧╨┼╬,├╠╧╙┼,├╚╥╧╒╘ ETC..
-
- ╥OUTINE : ╘┴╠╦
- ╦ERNAL ┴DDRESS: $╞╞┬4
- ─ESCRIPTION : ├OMMANDS DEVICE TO BEGIN TALKING.
- ╥EGISTERS ╔N : .┴ = DEVICE #.
- ╥EGISTERS ╧UT : .┴ USED.
- ═EMORY ├HANGED: ╬ONE.
- ╬OTE : ╠OW LEVEL SERIAL ╔/╧ - RECOMMENDED USE ╧╨┼╬,├╠╧╙┼,├╚╥╧╒╘ ETC..
-
- ╥OUTINE : ╥┼┴─╙╙
- ╦ERNAL ┴DDRESS: $╞╞┬7
- ─ESCRIPTION : ╥ETURN ╔/╧ STATUS BYTE.
- ╥EGISTERS ╔N : ╬ONE.
- ╥EGISTERS ╧UT : .┴ = STATUS BYTE. (SEE SECTION ON ┼╥╥╧╥ MESSAGES).
- ═EMORY ├HANGED: ╬ONE.
-
- ╥OUTINE : ╙┼╘╠╞╙
- ╦ERNAL ┴DDRESS: $╞╞┬┴
- ─ESCRIPTION : ╙ET LOGICAL FILE #, DEVICE #, SECONDARY # FOR ╔/╧.
- ╥EGISTERS ╔N : .┴ = LOGICAL FILE #, .╪ = DEVICE #, .┘ = SECONDARY #
- ╥EGISTERS ╧UT : ╬ONE.
- ═EMORY ├HANGED: ╬ONE.
-
- ╥OUTINE : ╙┼╘╬┴═
- ╦ERNAL ┴DDRESS: $╞╞┬─
- ─ESCRIPTION : ╙ETS POINTER TO FILENAME IN PREPERATION FOR ╧╨┼╬.
- ╥EGISTERS ╔N : .┴ = STRING LENGTH, .╪┘ = STRING ADDRESS.
- ╥EGISTERS ╧UT : ╬ONE.
- ═EMORY ├HANGED: ╬ONE.
- ╬OTE : ╘O SPECIFY _NO_ FILENAME SPECIFY A LENGTH OF 0.
-
- ╥OUTINE : ╧╨┼╬
- ╦ERNAL ┴DDRESS: $╞╞├0
- ─ESCRIPTION : ╧PEN UP FILE THAT HAS BEEN SETUP BY ╙┼╘╬┴═,╙┼╘╠╞╙
- ╥EGISTERS ╔N : ╬ONE.
- ╥EGISTERS ╧UT : .┴ = ERROR CODE, .╪,.┘ DESTROYED.
- .├ = 1 IF ERROR.
- ═EMORY ├HANGED: ╬ONE.
-
- ╥OUTINE : ├╠╧╙┼
- ╦ERNAL ┴DDRESS: $╞╞├3
- ─ESCRIPTION : ├LOSE A LOGICAL FILE.
- ╥EGISTERS ╔N : .┴ = LOGICAL FILE #.
- ╥EGISTERS ╧UT : .┴ = ERROR CODE, .╪,.┘ DESTROYED.
- .├ = 1 IF ERROR
- ═EMORY ├HANGED: ╬ONE.
-
- ╥OUTINE : ├╚╦╔╬
- ╦ERNAL ┴DDRESS: $╞╞├6
- ─ESCRIPTION : ╙ETS INPUT CHANNEL.
- ╥EGISTERS ╔N : .╪ = LOGICAL FILE #.
- ╥EGISTERS ╧UT : .┴ = ERROR CODE, .╪,.┘ DESTROYED.
- .├ = 1 IF ERROR
- ═EMORY ├HANGED: ╬ONE.
-
- ╥OUTINE : ├╚╦╧╒╘
- ╦ERNAL ┴DDRESS: $╞╞├9
- ─ESCRIPTION : ╙ETS OUTPUT CHANNEL.
- ╥EGISTERS ╔N : .╪ = LOGICAL FILE #.
- ╥EGISTERS ╧UT : .┴ = ERROR CODE, .╪,.┘ DESTROYED.
- .├ = 1 IF ERROR
- ═EMORY ├HANGED: ╬ONE.
-
- ╥OUTINE : ├╠╥├╚
- ╦ERNAL ┴DDRESS: $╞╞├├
- ─ESCRIPTION : ╥ESTORE DEFAULT INPUT AND OUTPUT CHANNELS.
- ╥EGISTERS ╔N : ╬ONE.
- ╥EGISTERS ╧UT : .┴, .╪ USED.
- ═EMORY ├HANGED: ╬ONE.
-
- ╥OUTINE : ┬┴╙╔╬
- ╦ERNAL ┴DDRESS: $╞╞├╞
- ─ESCRIPTION : ╥EAD CHARACTER FROM CURRENT INPUT CHANNEL.
- ├ASSETTE - ╥ETURNED ONE CHARACTER A TIME FROM CASSETTE BUFFER.
- ╥S-232 - ╥ETURN ONE CHARACTER AT A TIME, WAITING UNTIL
- CHARACTER IS READY.
- ╙ERIAL - ╥ETURNED ONE CHARACTER AT TIME, WAITING IF NESSC.
- ╙CREEN - ╥EAD FROM CURRENT CURSOR POSITION.
- ╦EYBOARD - ╥EAD CHARACTERS AS A STRING, THEN RETURN THEM
- INDIVIDUALLY UPON EACH CALL UNTIL ALL CHARACTERS
- HAVE BEEN PASSED ($0D IS THE ┼╧╠).
- ╥EGISTERS ╔N : ╬ONE.
- ╥EGISTERS ╧UT : .┴ = CHARACTER OR ERROR CODE, .├ = 1 IF ERROR.
- ═EMORY ├HANGED: ╬ONE.
-
- ╥OUTINE : ┬╙╧╒╘ AKA ├╚╥╧╒╘
- ╦ERNAL ┴DDRESS: $╞╞─2
- ─ESCRIPTION : ╧UTPUT BYTE TO CURRENT CHANNEL
- ╥EGISTERS ╔N : .┴ = ┬YTE
- ╥EGISTERS ╧UT : .├ = 1 IF ┼╥╥╧╥ (EXAMINE ╥┼┴─╙╘)
- ═EMORY ├HANGED: ─EPENDENT UPON CURRENT DEVICE.
-
- ╥OUTINE : ╠╧┴─
- ╦ERNAL ┴DDRESS: $╞╞─5
- ─ESCRIPTION : ╠OADS FILE INTO MEMORY (SETUP VIA ╙┼╘╠╞╙,╙┼╘╬┴═)..
- ╥EGISTERS ╔N : .┴ = 0 - ╠OAD, ╬ON-0 = ╓ERIFY
- .╪┘ = LOAD ADDRESS (IF SECONDARY ADDRESS = 0)
- ╥EGISTERS ╧UT : .┴ = ERROR CODE .├ = 1 IF ERROR.
- .╪┘ = ENDING ADDRESS
- ═EMORY ├HANGED: ┴S PER REGISTERS / DATA FILE.
-
- ╥OUTINE : ╙┴╓┼
- ╦ERNAL ┴DDRESS: $╞╞─8
- ─ESCRIPTION : ╙AVE SECTION OF MEMORY TO A FILE.
- ╥EGISTERS ╔N : .┴ = ┌-PAGE PTR TO START ADRESS
- .╪┘ = END ADDRESS
- ╥EGISTERS ╧UT : .┴ = ERROR CODE, .├ = 1 IF ERROR.
- .╪┘ = USED.
- ═EMORY ├HANGED: ╬ONE.
-
- ╥OUTINE : ╙┼╘╘╔═
- ╦ERNAL ┴DDRESS: $╞╞─┬
- ─ESCRIPTION : ╙ET INTERNAL CLOCK (╘╔$).
- ╥EGISTERS ╔N : .┴╪┘ - ├LOCK VALUE IN JIFFIES (1/60 SECS).
- ╥EGISTERS ╧UT : ╬ONE.
- ═EMORY ├HANGED: ╥ELEVANT SYSTEM TIME LOCATIONS SET.
-
- ╥OUTINE : ╥─╘╔═
- ╦ERNAL ┴DDRESS: $╞╞─┼
- ─ESCRIPTION : ╥EADS INTERNAL CLOCK (╘╔$)
- ╥EGISTERS ╔N : ╬ONE.
- ╥EGISTERS ╧UT : .┴╪┘ - ├LOCK VALUE IN JIFFIES (1/60 SECS).
- ═EMORY ├HANGED: ╬ONE.
-
- ╥OUTINE : ╙╘╧╨
- ╦ERNAL ┴DDRESS: ╞╞┼1
- ─ESCRIPTION : ╙CANS ╙╘╧╨ KEY.
- ╥EGISTERS ╔N : ╬ONE.
- ╥EGISTERS ╧UT : .┴ = LAST KEYBOARD ROW, .╪ = DESTROYED (IF STOP KEY)
- ═EMORY ├HANGED: ╬ONE.
- ╬OTE : ╘HE LAST KEYBOARD ROW IS AS FOLLOWS:
- .┴ -> ▄ 7 ▄ 6 ▄ 5 ▄ 4 ▄ 3 ▄ 2 ▄ 1 ▄ 0
- ╦┼┘: ▄╙╘╧╨ ▄╤ ▄├= ▄╙╨┴├┼▄2 ▄├╘╥╠ ▄<- ▄1
-
- ╥OUTINE : ╟┼╘╔╬
- ╦ERNAL ┴DDRESS: $╞╞┼4
- ─ESCRIPTION : ╥EAD BUFFERED DATA FROM FILE.
- ╦EYBOARD - ╥EAD FROM KEYBOARD BUFFER, ELSE RETURN NULL ($00).
- ╥S-232 - ╥EAD FROM ╥S-232 BUFFER, ELSE NULL IS RETURNED.
- ╙ERIAL - ╙EE ┬┴╙╔╬
- ├ASSETTE - ╙EE ┬┴╙╔╬
- ╙CREEN - ╙EE ┬┴╙╔╬
- ╥EGISTERS ╔N : ╬ONE.
- ╥EGISTERS ╧UT : .┴ = CHARACTER, .├ = 1 IF ERROR.
- .╪┘ = USED.
- ═EMORY ├HANGED: ╬ONE.
-
- ╥OUTINE : ├╠┴╠╠
- ╦ERNAL ┴DDRESS: $╞╞┼7
- ─ESCRIPTION : ├LOSE ALL OPEN FILES AND CHANNELS.
- ╥EGISTERS ╔N : ╬ONE.
- ╥EGISTERS ╧UT : .┴╪ USED.
- ═EMORY ├HANGED: ╬ONE.
- ╬OTE : ╘HIS ROUTINE DOES NOT _ACTUALLY_ CLOSE THE FILES, RATHER IT
- REMOVES THEIR PRESCENSE FROM THE FILE TABLES HELD IN MEMORY.
- ╔T'S RECOMMENDED TO USE CLOSE TO CLOSE FILES INSTEAD OF USING
- THIS ROUTINE.
-
-
- ╥OUTINE : ╒─╘╔═┼
- ╦ERNAL ┴DDRESS: $╞╞┼┴
- ─ESCRIPTION : ╒PDATE INTERNAL (╘╔$) CLOCK BY 1 JIFFIE (1/60 SEC).
- ╥EGISTERS ╔N : ╬ONE.
- ╥EGISTERS ╧UT : .┴,.╪ DESTROYED.
- ═EMORY ├HANGED: ╥ELEVANT SYSTEM TIME LOCATIONS CHANGED.
-
- ╥OUTINE : ╙├╥╧╥╟
- ╦ERNAL ┴DDRESS: $╞╞┼─
- ─ESCRIPTION : ╥ETURNS CURRENT WINDOW/SCREEN SIZE
- ╥EGISTERS ╔N : ╬ONE.
- ╥EGISTERS ╧UT : .╪ - ╫INDOW ╥OW ═AX
- .┘ - ╫INDOW ├OL ═AX
- .┴ - ╙CREEN ├OL ═AX (128 ONLY, 64 UNCHANGED)
- ═EMORY ├HANGED: ╬ONE
-
- ╥OUTINE : ╨╠╧╘
- ╦ERNAL ┴DDRESS: $╞╞╞0
- ─ESCRIPTION : ╥EAD OR SET CURSOR POSITION.
- ╥EGISTERS ╔N : .├ = 1 (╥EAD) ▄ .├ = 0 (╙ET)
- ╬ONE. ▄ .╪ = ├OL
- ▄ .┘ = ╥OW
- ╥EGISTERS ╧UT : .├ = 1 (╥EAD) ▄ .├ = 0 (╙ET)
- .╪ = ├URRENT ├OL ▄ ╬ONE.
- .┘ = ├URRENT ╥OW ▄
- ═EMORY ├HANGED: ╬ONE ▄ ╙CREEN ┼DITOR ╠OCATIONS.
-
- ╥OUTINE : ╔╧┬┴╙┼
- ╦ERNAL ┴DDRESS: $╞╞╞3
- ─ESCRIPTION : ╥ETURNS BASE OF ╔/╧ ┬LOCK
- ╥EGISTERS ╔N : ╬ONE.
- ╥EGISTERS ╧UT : .╪┘ = ADDRESS OF ╔/╧ BLOCK ($─000)
- ═EMORY ├HANGED: ╙CREEN ┼DITOR ╠OCATIONS.
-
- ============================================================================
- 64╦ ╓─├ ╥┴═ AND AN ALTERNATE ╟┼╧╙128 ┬ACKGROUND ╙CREEN
- BY ╥OBERT ┴. ╦NOP ╩R. (RKNOP@TYBALT.CALTECH.EDU, ╥.╦╬╧╨1 ON ╟┼NIE)
-
- ╔. ╔NTRODUCTION
-
- ╟┼╧╙, BOTH THE 64 AND 128 VARIETIES, USES BITMAPPED SCREENS FOR ITS OUTPUT.
- ╔N 40 COLUMNS, THIS MEANS 8╦ OF SYSTEM MEMORY IS SET ASIDE FOR THE MAIN
- SCREEN. ╘HEN, IN ADDITION, ╟┼╧╙ ALSO USES DISPLAY BUFFERING; IN OTHER WORDS,
- ╟┼╧╙ ALLOCATES A SECOND 8╦ AS A "BACKGROUND" (┬╟) SCREEN THAT IS USED TO KEEP
- AN INTACT COPY OF THE FOREGROUND (╞╟) SCREEN. ╘HIS CAN BE VERY USEFUL FOR A
- NUMBER OF REASONS; ONE, IT CAN BE USED AS AN UNDO BUFFER, AS IT IS IN
- GEO╨AINT. ╫HEN YOU HAVE A DELICATE DRAWING, AND THEN ACCIDENTALLY RUN THE
- ERASER ACROSS IT, THE EFFECTS OF THE ERASER ARE ONLY WRITTEN TO THE ╞╟ SCREEN.
- ┴ CLICK OF THE ╒╬─╧ BUTTON BRINGS THE ┬╟ SCREEN, WITH THE PRE-ERASER VERSION
- OF YOUR PAINTING, BACK TO THE FORE. ┴NOTHER USE IS FOR BUFFERING THE CONTENTS
- OF THE SCREEN WHEN SOMETHING LIKE A DIALOG BOX OR A MENU IS WRITTEN OVER IT.
- ╫HEN A DIALOG BOX IS ERASED, AND YOU SEE WHATEVER HAD BEEN UNDERNEATG IT
- MAGICALLY REAPPEAR, THE GRAPHICS UNDERNEATH ARE BEING PULLED FROM THE ┬╟
- SCREEN.
-
- ┴PPLICATIONS HAVE THE OPTION NOT TO USE THE ┬╟ SCREEN. ├HANGE A COUPLE OF
- VECTORS AND FLAGS, AND YOU CAN USE THE 8╦ ┬╟ SCREEN FOR APPLICATION ╥┴═.
- (╘HIS IS VERY CONVENIENT, SINCE THE ┬╟ SCREEN IS DIRECTLY ABOVE THE NORMAL 22╦
- OF APPLICATION ╥┴═ IN THE ╟┼╧╙ MEMORY MAP.) ╧F COURSE, THE APPLICATION THEN
- HAS TO PROVIDE SOME WAY OF REDRAWING BLOCKS OF THE SCREEN HIDDEN BY MENUS AND
- DIALOG BOXES. GEO╫RITE IS AN EXAMPLE OF THIS; WHEN YOU BRING UP, AND EXIT
- FROM, A DIALOG BOX IN GEO╫RITE, THERE IS BRIEFLY A BLANK RECTANGLE ON THE
- SCREEN BEFORE THE TEXT IS REDRAWN ON THE SCREEN.
-
- ╒NDER ╟┼╧╙128 IN 80 COLUMNS, THE BITMAP SCREEN IS NOW TWICE AS LARGE: 640X200
- INSTEAD OF 320X200. ╘HE ╞╟ SCREEN, HERE 16╦, OCCUPIES ╓─├ MEMORY. ╘HE MEMORY
- USED FOR BOTH THE 40 COLUMN ╞╟ AND 40 COLUMN ┬╟ SCREEN IS USED FOR THE 80
- COLUMN ┬╟ SCREEN.
-
- ╟┼╧╙128 WAS WRITTEN FOR, AND RUNS ON, 128'S WITH ONLY THE USUAL 16╦ OF ╓─├
- ╥┴═. ┴ND, IT USES BASICALLY ALL 16╦ OF THIS ╥┴═. ╚OWEVER, IF YOU HAVE 64╦ OF
- ╓─├ ╥┴═ (AS IS THE CASE WITH 128─'S, AND WITH FLAT 128'S THAT HAVE BEEN
- UPGRADED), YOU'VE GOT AN ADDITIONAL 48╦ OF ╓─├ ╥┴═ THAT THE ╟┼╧╙ SYSTEM
- DOESN'T TOUCH. ╙O, WHY NOT USE SOME OF THIS ╥┴═ AS A 80 COLUMN ┬╟ SCREEN?
- ╘HEN, IF YOU ARE WRITING AN 80-COLUMN ONLY APPLICATION, YOU GET AN EXTRA 16╦,
- THE 40-COLUMN ┬╟ SCREEN AT $6000 AND THE 40-COLUMN ╞╟ SCREEN AT $A000, IN MAIN
- MEMORY WHICH YOUR APPLICATION CAN USE HOWEVER IT SEES FIT.
-
-
- ╔╔. ╙UPPORT ╥OUTINES
-
- ╧NLY A SMALL NUMBER OF ROUTINES ACTUALLY NEED TO BE WRITTEN TO IMPLEMENT THIS
- SCHEME; MOREOVER, THESE ROUTINES ARE REALATIVELY STRAIGHTFORWARD. ┴FTER ALL,
- WE ARE SIMPLY COPYING MEMORY FROM ONE PART OF ╓─├ ╥┴═ TO ANOTHER. ╘HE ╓─├'S
- BLOCK COPY FEATURE OF THE ╓─├ IS VERY HELPFUL IN THIS ENDEAVOR. (╙EE ├RAIG
- ╘AYLOR'S ARTICLE FROM LAST ISSUE, OR MOST ANY 128 PROGRAMMING GUIDE.) ╘HE
- FILE VDC-BG.SFX, ASSOCIATED WITH THIS ISSUE OF THE ╚ACKING ═AG, IS A
- SELF-EXTRACTING ARCHIVE WITH A NUMBER OF GEO╨ROGRAMMER SOURCE FILES (IN
- GEO╫RITE 2.1 FORMAT) AND A SMALL DIPPY DEMONSTRATION PROGRAM. ╘HE FILE ╓─├-┬╟
- CONTAINS THE FOLLOWING ROUTINES:
-
- ╔NIT╓─├ -- MAKE SURE YOUR ╓─├ KNOWS IT HAS 64╦ ╥┴═
- ╓─├╔MP╠INE -- ╔MPRINT HORIZONTAL LINE FROM ╞╟ SCREEN TO ┬╟ SCREEN
- ╓─├╥EC╠INE -- ╥ECOVER HORIZONTAL LINE FROM ┬╟ SCREEN TO ╞╟ SCREEN
- ╓─├╔MP╥ECT -- ╔MPRINT RECTANGLE FROM ╞╟ SCREEN TO ┬╟ SCREEN
- ╓─├╥EC╥ECT -- ╥ECOVER RECTANGLE FROM ┬╟ SCREEN TO ╞╟ SCREEN
-
- ┼ACH ╔MPRINT ROUTINE ACTUALLY USES MOST OF THE SAME CODE AS THE CORRESPONDING
- ╥ECOVER ROUTINE; ALL THAT DIFFERS IS THE OFFSET TO THE "SOURCE" AND
- "DESTINATION" SCREENS IN ╓─├ ╥┴═. (╘HE OFFSET FOR THE ╞╟ SCREEN IS $0000, AND
- FOR THE ┬╟ SCREEN IS $4000.) ╘HE ROUTINES TAKE THE SAME ARGUMENTS AS THE
- NON-╓─├ ╔MPRINT AND ╥ECOVER ROUTINES AS DOCUMENTED IN THE ╚ITCHHIKER'S ╟UIDE.
- (┘OU WILL NOTE, HOWEVER, THAT FOR WHATEVER REASON THE STANDARD ╟┼╧╙
- ╔MPRINT╠INE AND ╥ECOVER╠INE ROUTINES WERE ONLY IMPLEMENTED FOR ┴PPLE ╟┼╧╙.)
- ┬RIEFLY, THESE ARE:
-
- ╥OUTINE: ╔NIT╓─├
-
- ╨ASS: ╬OTHING
-
- ╥ETURN: ╬OTHING
-
- ─ESTROYS: A,X
-
- ╬OTE: ╘HIS ROUTINE SHOULD BE CALLED AT THE VERY BEGINNING OF YOUR
- PROGRAM BEFORE YOU DO ANY WRITING TO THE ╞╟ SCREEN OR THE ╓─├.
-
- ------------------------------------------------------------------------------
-
-
- ╥OUTINE: ╓─├╔MP╠INE
- ╓─├╥EC╠INE
-
- ╨ASS: R3 -- LEFT EDGE OF LINE TO IMPRINT/RECOVER (WORD)
- R4 -- RIGHT EDGE OF LINE TO IMPRINT/RECOVER (WORD)
- R11╠ -- Y COORDINATE OF LINE TO IMPRINT/RECOVER (BYTE)
-
- ╥ETURN: R3, R4 -- PROCESSED THROUGH ╬ORMALIZE╪
-
- ─ESTROYS: A,X,Y,R5-R8,R11
-
- -------------------------------------------------------------------------------
-
- ╥OUTINE: ╓─├╔MP╥ECT
- ╓─├╥EC╥ECT
-
- ╨ASS: R3 -- X-COORDINATE OF UPPER-LEFT CORNER (WORD)
- R2╠ -- Y-COORDINATE OF UPPER-LEFT CORNER (BYTE)
- R4 -- X-COORDINATE OF LOWER-RIGHT CORNER (WORD)
- R2╚ -- Y-COORDINATE OF LOWER-RIGHT CORNER (BYTE)
-
- ╥ETURN: R3,R4 -- PROCESSED THROUGH ╬ORMALIZE╪
-
- ─ESTROYS: A,X,Y,R5-R8,R10╠,R11
-
- ------------------------------------------------------------------------------
-
-
- ╘O DISCUSS THE IMPRINT AND RECOVER LINE ROUTINES, CONSIDER THE ┴╙├╔╔ DIAGRAM
- OF A PORTION OF A LINE ON THE ╓─├ SCREEN. ┴ X INDICATES A PIXEL THAT IS IN
- THE LINE TO BE COPIED. ╘HE ╔'S INDICATE BYTE BOUNDARIES; THE PIXEL BELOW EACH
- ╔ IS THE MSB OF THE CORRESPONDING BYTE IN THE ╓─├ BITMAP. (┬YTES INCREASE
- HORIZONTALLY ACROSS THE SCREEN; THERE IS NO CARD STRUCTURE FOUND IN THE 80
- COLUMN BITMAP SCREEN.)
-
- ╔ ╔ ╔ ╔
- ....XXXXXXXXXXXXXXXXXXXXXXXXX...
- ^ \______________/ ^
- LEFT ╔ RIGHT
- RESIDUAL FULL BYTES RESIDUAL
-
- ╘HE LINE MOVING ROUTINE NEEDS TO FIGURE THE LOCATION IN ╓─├ ╥┴═ OF THE
- LEFTMOST FULL BYTE, THE NUMBER OF FULL BYTES, AND THE LOCATION OF THE TWO
- RESIDUAL BYTES; ADDITIONALLY, IT BUILDS A BIT MASK FOR THE RESIDUAL BYTES,
- WITH BITS SET CORRESPONDING TO PIXELS TO BE COPIED. ╘HIS MASK IS USED TO
- CREATE THE PROPER COMBINATION OF DATA FROM THE SOURCE AND DESTINATION SCREENS
- IN THE TWO RESIDUAL BYTES.
-
- ╧NCE IT KNOWS ALL THIS, ALL THE LINE ROUTINES DO IS (1) SUBMIT A ╓─├ BLOCK
- COPY TO COPY THE FULL BYTES, (2) READ THE LEFT RESIDUAL BYTE FROM THE SOURCE,
- MASK OUT THE APPROPRIATE PIXELS, AND ╧╥ IT WITH THE APPROPRIATE PIXELS FROM
- THE DESTINATION, AND WRITE THAT ONE BYTE (3) REPEAT (2) FOR THE RIGHT RESIDUAL
- BYTE.
-
- ╘HE RECTANGLE ROUTINES SIMPLY CALL THE LINE COPY ROUTINES REPEATEDLY,
- (R2╚)-(R2╠)+1 TIMES. (╬OTE THAT WHILE THIS IS THE MOST EFFICIENT WAY TO DO IT
- FROM A CODING TIME POINT OF VIEW <GRIN>, REALLY THE RECTANGLE ROUTINES ONLY
- NEED CALCULATE THE RESIDUAL BIT MASKS AND THE LOCATIONS ONCE. ╘HEREAFTER,
- LOCATIONS CAN BE UPDATED BY ADDING 80 (THE LENGTH OF A ╓─├ LINE) FOR EACH NEW
- LINE. ╘HE CHANGES TO THE CODE TO IMPLEMENT THIS ARE NOT DIFFICULT, AND IT
- ISN'T CLEAR WHY ╔ DIDN'T MAKE THEM....)
-
-
- ╔╔╔. ╒SE OF THE ╥OUTINES
-
- ╔N A WORD, YOU USE THESE ROUTINES WHENEVER YOU WOULD HAVE USED THE NORMAL ╟┼╧╙
- IMPRINT/RECOVER ROUTINES. ╘HERE ARE A FEW OTHER CONSIERATIONS, THOUGH.
-
- ╞IRST OF ALL, YOU NEED TO SET THE FLAG DISP┬UFFER╧N TO ╙╘_╫╥_╞╧╥┼. ╘HE ╟┼╧╙
- SYSTEM GRAPHIC ROUTINES THINK THAT THE ┬╟ SCREEN IS IN MAIN MEMORY, AND THUS
- WILL NOT CORRECTLY USE YOUR NEW ╓─├ ┬╟ SCREEN. ╘HIS MEANS, UNFORTUNATELY,
- THAT YOU CAN'T JUST BLITHELY GO DRAWING GRAPHICS, ASSUMING THAT THEY'LL BE
- BUFFERED FOR RECALL WHEN NEEDED. ╚OWEVER, IT IS NOT TOO MUCH TROUBLE TO MAKE
- A CALL TO ╓─├╔MP╥ECT EITHER RIGHT AFTER YOU'VE MADE SOME GRAPHIC CHANGE, OR
- RIGHT BEFORE SOMETHING POTENTIALLY HAZARDOUS WILL HAPPEN (E.G. A CALL TO
- ─O─LG┬OX). ╞OR INSTANCE, YOU MIGHT HAVE ALL OF YOUR MAIN MENUS BE ─YNAMIC
- ╙UBMENUS WHICH CALL ╓─├╔MP╥ECT BEFORE OPENING THE SUBMENU.
-
- ╙ECOND, YOU SHOULD LOAD RECOVER╓ECTOR WITH ╓─├╥EC╥ECT. ╙INCE ╓─├╥EC╥ECT TAKES
- THE SAME PARAMETERS AS ╥ECOVER╥ECTANGLE, IT CAN SUBSTITUTE DIRECTLY FOR IT.
- ╧NCE YOU SET THIS VECTOR, ALL MENUS AND DIALOG BOXES ERASED FROM THE SCREEN
- AUTOMATICALLY RESTORE THE DESTROYED REGION FROM YOUR ╓─├ ┬╟ SCREEN.
-
- ┬OTH OF THESE ARE DEMONSTRATED IN THE TEST PROGRAM INCLUDED IN VDC-BG.SFX.
-
-
- ╔╓. ┴NOTHER 32╦
-
- ╘HE ALERT READER WILL HAVE NOTICED THAT THE ╓─├ ┬╟ SCREEN ONLY TAKES AS MUCH
- MEMORY AS THE ╓─├ ╞╟ SCREEN, I.E. 16╦. ╘HUS, EVEN WITH THIS SCHEME, THERE IS
- STILL ANOTHER 32╦ OF FREE MEMORY IN ╓─├ ╥┴═. ╤UADRUPLE BUFFERING, ANYONE?
-
- ┴ MORE TANTALIZING PROSPECT WOULD BE TO IMPLEMENT A 640X400 INTERLACED SCREEN
- FOR ╟┼╧╙128. ╘HIS PRESENTS A NUMBER OF PROBLEMS, HOWEVER. ╞IRST, THERE IS
- THAT TERRIBLE FLICKER. ┬UT, THIS CAN BE MADE REASONABLE THROUGH THE USE OF
- POLARIZING FILTERS (IN LAYMAN'S TERMS, "SUNGLASSES") AND APPROPRIATE COLOR
- CHOICES. ═ORE SERIOUSLY, THE ╟┼╧╙ KERNAL GRAPHIC ROUTINES ALL TAKE BYTE
- ARGUM└>:S FOR ┘ COORDINATES. ╙O, ALL 400 VERTICAL PIXELS CANNOT BE ADDRESSED
- WITH THOSE ROUTINES. ╘HUS, SOMBODY IMPLEMENTING A ╟┼╧╙ INTERLACED SCREEN IS
- FACED WITH RE-WRITING ALL OF THE GRAPHICS ROUTINES. (╙OMETHING TO DO WITH THE
- 8╦ YOU'VE FREED UP AT $A000, ╔ SUPPOSE.) ╙INCE EACH 640X400 GRAPHIC SCREEN
- WOULD REQUIRE 32╦ OF MEMORY FOR THE BITMAP, YOU COULD STILL HAVE A ╓─├
- ┬ACKGROUND SCREEN.
-
- [ ╬OTE: ╘HE CODE DISCUSSED WITHIN THIS ARTICLE IS AVAILABLE VIA ANONYMOUS
- ╞╘╨ AT TYBALT.CALTECH.EDU UNDER THE DIRECTORY PUB/RKNOP/HACKING.MAG AS
- VDC-BG.SFX. ╘HIS WILL DISSOLVE INTO THE ╟┼╧╫╥╔╘┼ SOURCE FILES.]
-
- ============================================================================
-
- ╟EO╨AINT ╞ILE ╞ORMAT
- --------------------
- BY ┬RUCE ╓RIELING (BVRIELING@UNDERGRAD.MATH.WATERLOO.EDU)
-
- ╟EO╨AINT IS AN EXCELLENT GRAPHICS PROGRAM WRITTEN FOR THE ╟┼╧╙ ENVIRONMENT. ╔TS
- DISK ACCESS IS RELATIVELY QUICK, COMPARED IT TO WHAT A COMPARABLE PROGRAM WOULD
- DO ON A NON-╟┼╧╙ EQUIPPED ├64. ╨ART OF THIS ACCOMPLISHMENT CAN BE ATTRIBUTED TO
- THE DISK╘URBO THAT IS AN INTEGRAL PART OF ╟┼╧╙. ╚OWEVER, THE SPECIAL ╟EO╨AINT
- FILE-SAVING SCHEME DESERVES SOME OF THE CREDIT.
-
-
- ╓╠╔╥
- ----
-
- ╟EO╨AINT FILES ARE ALWAYS STORED IN ╓ARIABLE ╠ENGTH ╔NDEXED ╥ECORDING FILES.
- ╓╠╔╥ FILES OFFER ADVANTAGES NOT AVAILABLE WITHOUT ╟┼╧╙. ╟ENERALLY SPEAKING, ╓╠╔╥
- IS THE ULTIMATE IN ╥┼╠┴╘╔╓┼ FILES.
-
- ╘HE FORMAT OF A ╓╠╔╥ FILE IS NOT THAT DIFFICULT TO FIGURE OUT. ╫HILE IN A
- REGULAR ├64 FILE, THE TWO BYTES DIRECTLY FOLLOWING THE ╞╔╠┼╘┘╨┼ BYTE IN THE
- DIRECTORY WOULD POINT TO THE DATA FILE FOLLOWING, ╓╠╔╥ FILES USE THESE TWO BYTES
- TO POINT TO A ╓╠╔╥ ╚┼┴─┼╥ ┬╠╧├╦ (DON'T CONFUSE THE ╓╠╔╥ ╚┼┴─┼╥ BLOCK WITH THE
- ╔╬╞╧ BLOCK). ╘HE FIRST TWO BYTES OF THIS BLOCK ARE $00/╞╞, AS THE HEADER BLOCK
- IS A ═┴╪╔═╒═ OF ONE BLOCK LONG. (╘HIS IS WHY WHEN YOU ╓┴╠╔─┴╘┼ A ╟┼╧╙ DISK FROM
- ├64 MODE, ╟EO╨AINT PICTURES ARE LOST. ╧NLY THE HEADER BLOCK IS RECOGNISED AS
- BEING PART OF THE FILE. ╘HE REST OF THE PICTURE GETS DEALLOCATED IN THE ┬┴═).
- ╘HE REMAINING 254 BYTES IN THE BLOCK ARE DIVIDED INTO 127 2-BYTE POINTERS TO
- TRACKS/SECTORS ON THE DISK. ╘HESE POINTERS POINT TO THE INDIVIDUAL RECORDS OF
- THE ╓╠╔╥ FILE, WHICH MAY BE ┴╬┘ NUMBER OF BLOCKS LONG. ╘HE ╓╠╔╥ TRACK/SECTOR
- POINTERS IN THE ╓╠╔╥ HEADER BLOCK ONLY POINT TO THE ╞╔╥╙╘ BLOCK OF THE CHAIN.
- ╞ROM THEN ON, THE SECTORS CHAIN THEMSELVES TOGETHER USING THE NORMAL FORMAT IE.
- THE FIRST TWO BYTES OF EACH BLOCK POINT TO THE FOLLOWING BLOCK.
-
- ┴ SAMPLE ╟EO╨AINT ╓╠╔╥ HEADER MIGHT LOOK LIKE THIS:
-
-