home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
ENTERPRS
/
C64
/
BBS
/
DTJPROG.ARC
/
DTJPROG.TXT
Wrap
Text File
|
2000-06-30
|
45KB
|
1,036 lines
─╘╩-┬┬╙ ╨ROGRAMMER'S ╔NFORMATION
2/23/91 - ╨RELIMINARY
╞OR REVISIONS 910202 AND HIGHER
------------------------------------------------------------------------------
╘HE INFORMATION GIVEN IN THIS TEXTFILE IS FOR THE USE OF PROGRAMMERS WHO WISH
TO WRITE THEIR OWN ┼[╪]┼├ MODULES FOR THE ─╘╩-┬┬╙. ╒SE THIS INFORMATION AT
YOUR OWN RISK! ─╘╩ ╙OFTWARE ASSUMES NO RESPONSIBILITY FOR ANY DAMAGE CAUSED
BY THE USE OF THIS INFORMATION. ╘HE INFORMATION IN THIS TEXTFILE IS SUBJECT
TO CHANGE WITHOUT NOTICE!
------------------------------------------------------------------------------
╘HIS TEXTFILE CONTAINS A MAP OF MEMORY LOCATIONS USED BY THE ─╘╩-┬┬╙. ┴LTHOUGH
MOST OF THESE LOCATIONS ARE NOT USABLE BY MODULES YOU MAY PROGRAM, SOME ARE,
AND THE REST ARE INCLUDED SO THAT YOU WILL KNOW WHICH MEMORY LOCATIONS ARE
USED BY THE ┬┬╙. ╠OCATIONS MARKED FOR FUTURE USE SHOULD NOT BE USED BY YOUR
PROGRAM AS THEY MAY CREATE CONFLICTS IN FUTURE REVISIONS OF THE ┬┬╙.
╘HIS MEMORY MAP ALSO LISTS THE ENTRY POINTS FOR THE VARIOUS MACHINE LANGUAGE
ROUTINES USED BY THE ─╘╩-┬┬╙. ╘HE MAJORITY OF THESE ROUTINES ARE ╬╧╘ INTENDED
TO BE USED BY YOUR PROGRAMS. ╚OWEVER, THERE ARE A COUPLE THAT YOU CAN USE, AND
THE USE OF THESE ROUTINES IS DESCRIBED LATER IN THIS TEXTFILE. ╨LEASE DO NOT
USE ANY ┬┬╙ MACHINE LANGUAGE ROUTINES OTHER THAN THE ONES DESCRIBED AFTER THE
MEMORY MAP! ═OST ROUTINES ARE SUBJECT TO CHANGE, AND MAY EVEN VARY WITHIN THE
SAME REVISION UNDER DIFFERENT HARDWARE CONDITIONS.
┬ESIDES THE MEMORY LOCATIONS LISTED HERE, THE ┬┴╙╔├ AND ╦ERNAL ROUTINES ALSO
USE THEIR OWN MEMORY LOCATIONS. ╘HE USE OF THEM ARE DESCRIBED IN MEMORY MAP
BOOKS FOR THE ├OMMODORE 64.
╘HE FOLLOWING ╥┴═ LOCATIONS ARE AVAILABLE FOR YOUR USE:
┌ERO PAGE: 02, 92H, 96H, 9┬-9├H, 9┼-9╞H, ┬┼-┬╞H, ├1-├4H.
╧THER: 0310-0313H, 032┼-032╞H, 0334-033┬H, 03╞├-03╞╞H, 07╞8H,
07╞─-07╞╞H, ├000-├11┬H.
╙OME OF THESE ADDRESSES ARE LISTED AS USED IN VARIOUS ├OMMODORE 64 MEMORY
MAPS, BUT YOU SHOULD BE ABLE TO USE THEM WITHOUT CAUSING ANY PROBLEMS. ╘HE
VALUES STORED IN THESE LOCATIONS WILL NOT BE DESTROYED AFTER YOUR MODULE
RETURNS CONTROL TO THE ┬┬╙ PROGRAM.
┘OU MAY ALSO USE ANY MEMORY LOCATION LISTED BELOW AS USED FOR TEMPORARY
STORAGE, BUT REMEMBER THAT VALUES STORED IN THESE LOCATIONS ARE SUBJECT TO
CHANGE AFTER YOUR MODULE HAS RETURNED CONTROL BACK TO THE ┬┬╙.
┴ ┬┴╙╔├ VARIABLE LIST IS ALSO GIVEN. ═OST OF THESE VARIABLES WILL NOT BE
USABLE BY YOUR PROGRAM, BUT THEY ARE ALL LISTED ANYWAY JUST TO MAKE THE LISTING
COMPLETE.
------------------------------------------------------------------------------
─╘╩-┬┬╙ ═EMORY ═AP (╥EVISION 910119):
------------------------------------------------------------------------------
╙IMPLIFIED (SHOWS ╥┴═ UNDER ╥╧═):
------------------------------------------------------------------------------
0000 - ╙YSTEM/┬┬╙ ╥┴═ VARIABLES
0400 - ╓IDEO ═EMORY
0800 - ├OMPLIED ┬┴╙╔├ CODE & VARIABLES
9┼34 - ═.╠. ═ODULE (╙.5) (╘ERMINAL / ┬AUDRATE TUNING FUNCTIONS)
┴000 - ┼DITOR/╨ROTOCOL/┼XEC-MODULE BUFFER
┬158 - ─ATA ═ODULE (╙.3) (CONFIGURATION DATA)
┬┬4┼ - ═.╠. ═ODULE (╙.4) (┼DITOR & ╞ILESERVER FUNCTIONS)
├000 - ┬UFFER AREAS
├15╞ - ═.╠. ═ODULE (╙.2) (╔NIT. AND MAIN ═.╠.)
─000 - ╔/╧ ╨ORTS (╥┴═ UNUSED - FUTURE USE)
┼000 - ┬ASES FILE MESSAGE POINTERS
╞72├ - ─ATA ═ODULE (╙.6) (┴WAITING-├ALL ╙CREEN / ╙HAREWARE SCREEN)
------------------------------------------------------------------------------
─ETAILED ═EMORY ═AP (SHOWS ─╘╩-┬┬╙ UNIQUE ADDRESSES ONLY):
------------------------------------------------------------------------------
0001 - ┬ANK SWITCH PORT
╘HE ─╘╩-┬┬╙ STORES THE EDIT BUFFER, LOADABLE MACHINE LANGUAGE
MODULES, SOME ADDITIONAL MACHINE LANGUAGE, AND THE S.3 CONFIGURATION
FILE UNDER THE ┬┴╙╔├ ╥╧═. ═ESSAGE POINTERS AND TABLES, THE AWAITING-
CALL SCREEN, SHAREWARE NOTICE SCREEN, AND ╦ERNAL ╥╧═ ╬═╔ ROUTINES ARE
STORED UNDER THE ╦ERNAL ╥╧═.
008┬-008├ - ┴├╔┴ BASE ╔/╧ POINTER (╙WIFTLINK ONLY).
008─ - ( FUTURE USE ).
008┼ - ═ENU-┴BORT ┼NABLE FLAG
╙TORING A NON-ZERO VALUE HERE CAUSES ALL FILE #2 OUTPUT (THE ┬┬╙
OUTPUT CHANNEL) TO BE DISCARDED WHEN THERE IS DATA IN THE ╥╙-232
INPUT BUFFER. ╘HIS LOCATION IS ZEROED WHEN THE ┬┬╙ REQUESTS INPUT
FROM THE USER. ╘HIS LOCATION IS USED TO IMPLIMENT THE ┬┬╙
"QUICK-KEYS".
008╞ - ( FUTURE USE ).
00┴0-00┴2 - ╩IFFY CLOCK - USED FOR PROTOCOL TIMING AND TIMEOUT CHECKS.
00┴5/00┴6 - ╒SED BY ╔╥╤ ROUTINE.
00┬0/00┬1 - ╘EMPORARY WORK POINTER.
00┬2/00┬3 - ╘EMPORARY WORK POINTER.
00╞┬/00╞├ - ╒SED BY ╧╨┼╬ ROUTINE.
00╞─/00╞┼ - ╘EMPORARY WORK POINTER.
02┴7 - ┬┬╙ ╔NPUT/╧UTPUT ├ONTROL.
├ONTROLS ╔/╧ THROUGH THE ┬┬╙ ╔/╧ CHANNEL (FILE #2). ╓ALID VALUES
ARE:
┬IT 0 - 0 = ┴╙├╔╔ TRANSLATION OFF
1 = ┴╙├╔╔ TRANSLATION ON
┬IT 1 - 0 = ╥╙-232 ╔/╧ ONLY
1 = ╥╙-232 AND CONSOLE ╔/╧
(┬OTH BITS ZERO ALLOWS RAW ╥╙-232 ╔/╧, OTHERWISE LINEFEED AND
XON/XOFF FLOW CONTROL ARE ACTIVE.)
02┴8 - ═ODEM DEVICE NUMBER.
╬ORMALLY 2, HOWEVER MAY BE CHANGED TO 4 TO ROUTE OUTPUT TO PRINTER.
╙INCE THIS SHOULD ONLY BE DONE ON CONSOLE MODE, DO NOT CHANGE THIS
LOCATION IN YOUR MODULES.
02┴9 - ├ARRIER-DETECT MASK.
┴LLOWS FOR CARRIER-DETECT TO BE TURNED ON OR OFF. ╘HIS IS USED TO
PREVENT DROPPED CARRIER CONDITIONS DURING CONSOLE MODE WHILE IN
MACHINE LANGUAGE ROUTINES. (┬┴╙╔├ HAS IT'S OWN CARRIER-DETECT
MASK VARIABLE.) ╓ALID VALUES ARE:
#$00 - ┬┬╙ IGNORES CARRIER
#$10 - ┬┬╙ DETECTS CARRIER
02┴┴ - ╠INEFEED FLAG.
┴ NON-ZERO VALUE WILL SEND A LINEFEED AFTER EACH #$0─ CODE SENT TO THE
MODEM IF THE ┬┬╙ INPUT/OUTPUT CONTROL IS NON-ZERO.
02┴┬ - ╪╧╞╞ FLAG.
┴ NON-ZERO VALUE WILL PAUSE OUTPUT VIA THE ┬┬╙ OUTPUT CHANNEL IF THE
┬┬╙ INPUT/OUTPUT CONTROL IS NON-ZERO.
02┴├ - ╓IDEO WIDTH.
├URRENT VIDEO WIDTH (MUST BE BETWEEN 20 AND 80).
02┴─ - ╠AST KEY PRESSED WHILE IN FILE SERVER.
╒SED BY ┬┴╙╔├ PORTION OF ┬┬╙ TO DETERMINE IF USER [┴]BORTED,
[╙]KIPPED, OR [╬]EXT'ED THE FILE OUTPUT.
02┴┼ - ┴BORT FLAG.
╒SED BY FILE SERVER. ╬ON-ZERO VALUE ABORTS FILE OUTPUT.
02┴╞ - ┬UFFER FILE NUMBER.
╒SED BY BUFFER LOAD/SAVE ROUTINES.
02┬0 - ┬AUD-RATE INDEX.
#$00 = ╙WIFTLINK BAUD #1 OR 300 BPS ON ╦ERNAL ╥╙-232
#$01 = ╙WIFTLINK BAUD #2 OR 1200 BPS ON ╦ERNAL ╥╙-232
#$02 = ╙WIFTLINK BAUD #3 OR 2400 BPS ON ╦ERNAL ╥╙-232
#$03 = ╙WIFTLINK BAUD #4 ONLY
#$04 = ╙WIFTLINK BAUD #5 ONLY
#$05 = ╙WIFTLINK BAUD #6 ONLY
╫HEN THE ┬┬╙ CHANGES THE BAUD, IT POKES THE BAUD RATE INDEX HERE,
THEN CALLS THE BAUD-RATE CHANGE ROUTINE. ╔F THE BAUD-RATE VALUE IS
╧╥'ED WITH #$08, THEN THE ┬┬╙ WILL ALWAYS CHANGE THE BAUD-RATE,
OTHERWISE IT WILL ONLY CHANGE IT IF CARRIER IS NOT PRESENT. ┴FTER
RETURNING FROM THE BAUD-RATE CHANGE ROUTINE, THIS LOCATION CONTAINS
THE CURRENT BAUD-RATE INDEX VALUE WHICH CAN BE USED TO VERIFY IF THE
BAUD RATE WAS CHANGED.
02┬1 - ╫INDOW FLAG.
╔F THIS LOCATION IS GREATER THAN ZERO, THEN THE ┬┬╙ WILL DISPLAY A
BLUE WINDOW AT THE TOP OF THE SCREEN. ╘HE NUMBER STORED HERE SHOULD
BE THE NUMBER OF CHARACTERS IN THE WINDOW. (├URRENTLY, THIS NUMBER IS
80.)
02┬2/02┬3 - ═AXIMUM NUMBER OF ├┬═ DISK BLOCKS ALLOWED IN FILE UPLOAD.
02┬4/02┬5 - ═ESSAGE NUMBER ( ═ESSAGE DATABASE ROUTINES ).
02┬6/02┬7 - ╧LDEST MESSAGE INDEX ( ═ESSAGE DATABASE ROUTINES ).
02┬8/02┬9 - ╬EW MESSAGE NUMBER ( ═ESSAGE DATABASE ROUTINES ).
02┬┴ - ╥OOM NUMBER + #$40 ( ═ESSAGE DATABASE ROUTINES ).
02┬┬ - ═AXIMUM NUMBER OF ROOMS ( ═ESSAGE DATABASE ROUTINES).
═UST ALWAYS EQUAL 50! ─O NOT CHANGE!
02┬├ - ├╧╬╘╥╧╠-├ MASK.
#$00 = ─ISABLE ├╧╬╘╥╧╠-├ DETECT
#$╞╞ = ┼NABLE ├╧╬╘╥╧╠-├ DETECT
02┬─ - ╥╙-232 STATUS REGISTER ╪╧╥ VALUE.
02┬┼ - ╙YSTEM ├ONTROL ┬LOCK.
┬ITS ARE ARRANGED AS FOLLOWS:
┬IT 0 = ├╚╘
┬IT 1 = ├┼╬
┬IT 2 = ═╧╬
┬IT 3 = ╬┼╫
┬IT 4 = ╨┴╙
┬IT 5 = ├╥┼
┬IT 6 = ╞╒╠
┬IT 7 = ╙┘╙
02┬╞ - ╨RINTER TYPE.
╬ON-ZERO VALUE HERE TURNS ├┬═-┴╙├╔╔ TRANSLATION ON FOR PRINTER.
02├0 - ┼DIT BUFFER SIZE.
╙IZE IN 256-BYTE BLOCKS PLUS ┴0H.
02├1-02├6 - ╘WIT DETECTOR THRESHOLD VALUES.
02├7-02─1 - ╘WIT DETECTOR TRIGGER VALUES.
02─2 - ├ENSOR MODE FLAG.
╔NDICATES TO CENSOR ROUTINE IF CENSOR ROUTINE IS BEING CALLED FROM
THE FILE SERVER OR THE TWIT DETECTOR. ╔F THE CENSOR ROUTINE IS
BEING CALLED FROM THE FILE SERVER, THEN ANY WORDS BLANKED OUT WILL
NOT TRIGGER THE TWIT DETECTOR.
02─3 - ├ENSOR WORD COUNTER ( ╘WIT DETECTOR ).
02─4 - ═INUTE STORAGE ( ╔╥╤ ╫INDOW ROUTINE ).
╘HIS LOCATION IS USED TO MAKE SURE THE WINDOW IS UPDATED AT LEAST
ONCE A MINUTE.
02─5 - ╔NPUT INTERRUPT FLAG.
╘HIS LOCATION INDICATES TO THE ┬┴╙╔├ PORTION OF THE ┬┬╙ IF THE INPUT
ROUTINE OR FILE SERVER ROUTINE WAS INTERRUPTED ABNORMALLY. ╘HIS
OCCURS WHEN CERTAIN FUNCTION KEYS OR ├╧╬╘╥╧╠-├ ARE PRESSED, IF
CARRIER IS DROPPED, OR A TIMEOUT ERROR OCCURS. ╓ALID VALUES ARE:
#$00 = ╬ORMAL (NO INTERRUPT OCCURRED)
#$08 = ╞4 KEY PRESSED
#$09 = ├╘╥╠-├ KEY PRESSED
#$0┴ = ╞2 KEY PRESSED
#$0┬ = ╞6 KEY PRESSED
#$0├ = ╞8 KEY PRESSED
#$0─ = ├ARRIER DROP
#$0┼ = ╘IMEOUT ERROR
┴PPROPRIATE ACTION IS TAKEN WHEN CONTROL RETURNS TO THE ┬┴╙╔├ PORTION
OF THE PROGRAM.
02─6 - ├ONTROL-KEY FLAG.
╒SED WHEN ENTERING CONTROL CODES VIA THE ├╘╥╠-╨ SEQUENCE TO TELL THE
┬┬╙ NOT TO INTERPRET THE CODE AS A COMMAND, BUT TO ACCEPT IT AS
NORMAL DATA.
02─7-02┼┴ - ( FOR FUTURE USE ).
02┼┬ - ╘EMPORARY WORK SPACE ( ├╘╥╠-╨ HEXADECIMAL-BINARY CONVERSION ).
02┼├ - ╘EMPORARY WORK SPACE ( ├╘╥╠-╨ HEXADECIMAL-BINARY CONVERSION ).
02┼─ - ╘EMPORARY WORK SPACE ( ═ESSAGE DATABASE ROUTINES ).
02┼┼/02┼╞ - ╘EMPORARY WORK SPACE ( ═ESSAGE DATABASE ROUTINES ).
02╞0/02╞1 - ╘EMPORARY WORK SPACE ( ═ESSAGE DATABASE ROUTINES ).
02╞2 - ╘EMPORARY WORK SPACE ( ╙┘╙ STATEMENT ARGUMENT VALUES ).
02╞3 - ╘EMPORARY WORK SPACE ( ╞ILE SERVER ROUTINE ).
02╞6 - ╘EMPORARY WORK SPACE ( ╞ILE SERVER ROUTINE ).
02╞7 - ╥╙-232 INTERRUPT STATUS SAVE.
╘HIS IS USED BY THE PAUSE ROUTINE.
02╞8-02╞┴ - ( FOR FUTURE USE ).
02╞┬ - ─ISABLE REMOTE-ENABLE FLAG (I.E. DATE = "999999").
02╞├ - ╘EMPORARY WORK SPACE ( HOURS SAVE / DIRECTORY BLOCKS FREE ).
02╞─ - ╘EMPORARY WORK SPACE ( MINUTES SAVE / DIRECTORY BLOCKS FREE ).
02╞┼ - ╨═-TO-┴═ TRACKER (USED FOR MIDNIGHT HOUSEKEEPING).
02╞╞ - ╘EMPORARY WORK SPACE ( [╙]AVE [╦]EEP FLAG ).
033├ - ├URRENT DRIVE LETTER
╘HIS LOCATION STORES THE ┴╙├╔╔ VALUE OF THE CURRENT DRIVE LETTER.
033─-0354 - ├URRENT PARTITION TABLE
24 MEMORY LOCATIONS, ONE FOR EACH POSSIBLE PHYSICAL DRIVE (DEVICES
8-31). ┼ACH LOCATION CONTAINS THE ┴╙├╔╔ VALUE OF THE LAST DRIVE
LETTER THAT ACCESSED THAT PHYSICAL DRIVE. ╘HIS IS USED TO DETERMINE
IF THE KERNAL OVERLAY SHOULD SEND THE COMMAND CHANNEL STRING WHEN
OPENING A FILE. ╘O FORCE THE ┬┬╙ TO SEND THE COMMAND CHANNEL STRING,
SET THE APPROPIATE LOCATION (OR ALL LOCATIONS) TO ZERO.
0355-035─ - 300 BPS ╥╙-232 DATA (╦ERNAL ╥╙-232 ONLY)
─ATA IS ORGANIZED AS FOLLOWS:
┬YTES 1-4 = ─ATA STORED IN MOCK ╥╙-232 CONTROL REGISTERS
┬YTES 5-6 = ╥ECEIVER HALF-BIT TIME
┬YTES 7-8 = ╘RANSMITTER FULL-BIT TIME
035┼-0365 - 1200 BPS ╥╙-232 DATA (╦ERNAL ╥╙-232 ONLY)
(╙EE ABOVE.)
0366-036─ - 2400 BPS ╥╙-232 DATA (╦ERNAL ╥╙-232 ONLY)
(╙EE ABOVE.)
036┼-0373 - ╚AYES ╥ESPONSE ├ODE ╘ABLE (╙WIFTLINK ╥╙-232 ONLY)
╙IX BYTES, ONE FOR EACH POSSIBLE BAUDRATE. ╘HIS TABLE CONTAINS THE
RESPONSE CODES THAT THE ┬┬╙ LOOKS FOR TO DETERMINE THE BAUDRATE OF
THE INCOMING CALL. ╙ETABLE USING PROGRAM ╙╫-╙┼╘.
0374-0379 - ┴├╔┴ ├ONTROL ╥EGISTER ╘ABLE (╙WIFTLINK ╥╙-232 ONLY)
╙IX BYTES, ONE FOR EACH POSSIBLE BAUDRATE. ╘HIS TABLE CONTAINS THE
VALUE TO BE STORED IN THE ┴├╔┴ COMMAND REGISTER FOR A PARTICULAR
BAUDRATE. ╙ETABLE USING PROGRAM ╙╫-╙┼╘.
037┴-037╞ - ┬AUDRATE ╓ALUE ╘ABLE (╙WIFTLINK ╥╙-232 ONLY)
╙IX BYTES, ONE FOR EACH POSSIBLE BAUDRATE. ╘HIS TABLE CONTAINS THE
DISPLAYED BAUDRATE VALUE FOR EACH BAUDRATE. ╙ETABLE USING PROGRAM
╙╫-╙┼╘.
0380-0383 - ( FOR FUTURE USE ).
0384-03─3 - ╫INDOW DATA.
╘HESE LOCATIONS CONTAINS THE DATA TO BE DISPLAYED IN THE BLUE WINDOW
IN THE FORM OF SCREEN CODES. ╘HIS DATA SHOULD NOT BE MODIFIED SINCE
THE ┬┬╙ NOT ONLY WRITES TO THIS BUFFER, BUT IT ALSO READS THE DATA
BACK SINCE SOME OF THE ┬┬╙'S MACHINE LANGUAGE ROUTINES MAY MODIFY THE
WINDOW DATA.
03─4-03╞┬ - ( FOR FUTURE WINDOW EXPANSION ).
03╞├-03╞╞ - ╞REE ╥┴═.
07╞9 - ─ATE ╨RESET FLAG
┴ VALUE OF #$7┬ HERE INDICATES THE NEXT THREE BYTES CONTAIN A VALID
DATE. ╘HIS AND THE NEXT THREE BYTES ARE USED ONLY WHEN REBOOTING THE
┬┬╙.
07╞┴ - ─ECIMAL YEAR (0-99)
07╞┬ - ─ECIMAL MONTH (1-12)
07╞├ - ─ECIMAL DAY (1-31)
0800-9┼33 - ├OMPILED ┬┴╙╔├ PORTION OF ┬┬╙ & VARIABLE AREA.
9┼34 = ╙.5 ═ACHINE ╠ANGUAGE ═ODULE (├╚┴╬╟┼ ┬┴╒─ ┼NTRY)
9┼37 = ╘┼╥═╔╬┴╠ ┼NTRY
9┼3┴ = ╘╧╟╟╠┼ ─╘╥ ┼NTRY
9┼3┴-9╞┼5 = ─╘╥/╘┼╥═╔╬┴╠/┬┴╒─ ╘╒╬╔╬╟ ╥OUTINES
9╞┼7 - ╥╙-232 STATUS REGISTER ( ╪╧╥'ED )
╘HE ╔╥╤ ROUTINE CHECKS THE ╥╙-232 STATUS EVERY 1/60TH OF A SECOND,
╪╧╥'S THE VALUE FOUND THERE WITH ╪╧╥ VALUE (@ 02┬─H), AND STORES THE
RESULT HERE. ┴LL CHECKS FOR CARRIER SHOULD BE CHECKED HERE. ├ARRIER
IS PRESENT WHEN BIT 4 (VALUE = 10H) IS 0. ├ARRIER SHOULD BE CHECKED
AS FOLLOWS:
LDA $9FE7 ; GET RS-232 STATUS
AND #$10 ; MASK ALL BITS EXCEPT CARRIER
AND $02A9 ; MASK WITH CARRIER-DETECT MASK
BNE -NO CARRIER-
-CARRIER-
┴000-┬157 - ┼DITOR, ╞ILE COPIER, ╨ROTOCOL AND ┼XEC MODULE BUFFER
╠OCATION $┴000 NORMALLY CONTAINS A #$0─ (├╥), FOLLOWED BY THE
EDIT BUFFER TEXT, WITH A ╬╒╠╠ BYTE USED AS AN ┼╧╘ CHARACTER.
╘HE ┬┬╙'S FILE COPIER AND LOADABLE MACHINE LANGUAGE MODULES WILL
OVERWRITE ANY EDIT BUFFER TEXT. ╔F THE EDIT BUFFER TEXT IS OVER-
WRITTEN, THEN THE ┬┬╙ WILL CLEAR THE EDIT BUFFER BEFORE THE NEXT
├╧══┴╬─ PROMPT SO THAT THE USER WILL NOT SEE ANY GARBAGE CHARACTERS
IN THE BUFFER. ┴ FUTURE REVISION OF THE ┬┬╙ MAY COPY THE EDIT
BUFFER CONTENTS TO THE ╔/╧ AREA ╥┴═ (WHICH IS CURRENTLY UNUSED)
BEFORE THE EDIT BUFFER IS OVERWRITTEN.
┬158-┬┬4─ - ╙.3 CONFIGURATION FILE BUFFER
├ONTAINS THE CENSOR VOCABULARY, A ╬╒╠╠, ╦ERNAL OVERLAY (EACH ENTRY
FOLLOWED BY A ╬╒╠╠), AND THE EDITABLE PHRASES (EACH ENTRY FOLLOWED BY
A ╬╒╠╠).
┬┬4┼ = ┼─╔╘╧╥/╞╔╠┼ ╙┼╥╓┼╥ ┼NTRY.
┴LL MACHINE LANGUAGE FUNCTIONS OF THE EDITOR (WRITING, LISTING,
EDITTING, LOADING AND SAVING), AS WELL AS THE FILE SERVER ROUTINE
(USED TO DISPLAY ALL TEXT FROM DISK SUCH AS MESSAGES, EMAIL,
╙╔╟FILES, ETC), ARE CALLED THROUGH THIS LOCATION.
┬┬51 = ├┼╬╙╧╥ ┼NTRY.
╘HIS IS ┬┴╙╔├'S ENTRY INTO THE CENSOR ROUTINE. ╘HIS ENTRY IS USED
BY THE TWIT DETECTOR.
┬┬54-┬╞╞╞ = ╙.4 ═ACHINE ╠ANGUAGE ═ODULE
├000-├11┬ - ╘EMPORARY STORAGE BUFFERS.
╘HIS AREA IS USED BY THE ┬┬╙ AS BUFFERS FOR THE EDITOR SEARCH AND
REPLACE ROUTINES, LIST ROUTINES, AND THE ┬┬╙ LINE EDITOR. ╘HIS AREA
MAY BE USED BY MODULES IN ANY MANNER. ╘HERE IS ENOUGH ROOM HERE FOR
ONE 256-BYTE OR TWO 128-BYTE FILE TRANSFER BUFFERS. ┘OU CAN ALSO
USE IT TO STORE SHORT MACHINE LANGUAGE ROUTINES SUCH AS A ROUTINE TO
SWITCH IN THE ┬┴╙╔├ ╥╧═ TEMPORARILY, CALL A SUBROUTINE, AND SWITCH
┬┴╙╔├ BACK OUT.
├11├-├15┬ - ├ENSOR VOCABULARY INDEX (ALLOWS FOR UP TO 64 ENTRIES).
╘HIS INDEX IS USED TO HELP SPEED THINGS UP FOR THE NASTY-WORD-
CHECKER. ╔T CONTAINS THE LENGTH OF EACH WORD IN THE VOCABULARY.
├15├ = (FUTURE USE)
├15╞ = ┼─╔╘╧╥/╞╔╠┼ ╙┼╥╓┼╥ ╙ETUP ┼NTRY.
╙WITCHES ┬┴╙╔├ OUT AND JUMPS TO ┬┬4┼ (THE S.4 MODULE).
├162 = ├╧╬╙╧╠┼/├╧╬╘╥╧╠ ╔╬╘┼╥╥╒╨╘ ├╚┼├╦┼╥ ┼NTRY.
┴LSO CALLED BY THE ╠╔╬┼ ┼─╔╘╧╥ ROUTINE.
├165 = ─╔╥┼├╘╧╥┘ ╥┼┴─┼╥ ┼NTRY
─ISPLAYS DISK DIRECTORY. ═UST HAVE DIRECTORY FILE OPEN AND ┬┴╙╔├
SWITCHED IN.
═EM-LOC (02╞2) = #$00 - ╬ORMAL DISK DIRECTORY FORMAT
= #$01 - ╙╔╟FILE DISK DIRECTORY FORMAT
├168 = ╙╘┴├╦ ╥┼╙┼╘ ┼NTRY
╒SED TO RESET THE STACK AT ├╧══┴╬─ PROMPTS. ─O NOT USE!
├16┬ = ─╔╙╨╠┴┘ ╧╞╞-╠╔╬┼ ╙├╥┼┼╬ ┼NTRY.
─ISPLAYS THE BACKGROUND FOR AWAITING-CALL SCREEN.
├16┼ = ─╔╙╨╠┴┘ ╙╚┴╥┼╫┴╥┼ ╙├╥┼┼╬ ┼NTRY.
─ISPLAYS THE SHAREWARE SCREEN (╙╚╔╞╘/├╘╥╠ SCREEN).
├171 = ─╔╙╨╠┴┘ ╙.3 ╞╔╠┼ ┼─╔╘┴┬╠┼ ╨╚╥┴╙┼ ┼NTRY.
╘HIS ROUTINE EITHER DISPLAYS THE EDITABLE PHRASE FROM THE S.3 FILE
DATA, OR OPENS A FILE AND DISPLAYS THE FILE.
├174 = ╬╧╬-├┴╙┼-╙┼╬╙╔╘╔╓┼ ╙╘╥╔╬╟ ├╧═╨┴╥┼ ┼NTRY.
├OMPARES TWO STRING VARIABLES. ╘HIS ROUTINE COMPARES ONLY
CHARACTERS UP TO THE LENGTH OF THE SECOND STRING.
├177 = ╞╔╠┼-├╧╨╔┼╥ ─╔╙╦ ╥┼┴─ ┼NTRY.
╥EADS BLOCKS INTO THE EDIT BUFFER.
├17┴ = ─╔╙╦ ╠╔╬┼-╔╬╨╒╘ ┼NTRY.
╒SED TO INPUT A STRING INTO ONE OR MORE VARIABLES.
├17─ = ╟┼╘ ├╚┴╥┴├╘┼╥ ┼NTRY.
┴LL ┬┬╙ INPUTS USE THIS ROUTINE TO ACCEPT DATA FROM THE USER. ╘HIS
ROUTINE WILL RETURN WITH CARRY SET IF AN INTERRUPT REQUEST OCCURS
DUE TO CARRIER DROP, ├╘╥╠-├, AND CERTAIN FUNCTION KEYS ARE PRESSED.
╔F CARRIER IS SET, THEN THE MODULE SHOULD EXIT TO RETURN CONTROL TO
THE ┬┬╙ SO IT CAN HANDLE THE INTERRUPT REQUEST.
├180 = ╟┴╥┬┴╟┼ ├╧╠╠┼├╘╧╥ ┼NTRY.
╘HIS ROUTINE ERASES CERTAIN STRING VARIABLES TO PROVIDE FOR A FASTER
GARBAGE COLLECTION. ╟ARBAGE COLLECTION OCCURS BEFORE THE ├╧══┴╬─
PROMPT.
├183 = ╞╔╠┼-├╧╨╔┼╥ ─╔╙╦ ╫╥╔╘┼ ┼NTRY.
╫RITES DISK BLOCK INFO FROM THE EDIT BUFFER TO THE DISK.
├186 = ─╔╙╨╠┴┘-╘╥┴╬╙╠┴╘┼ ┼NTRY.
╒SED INTERNALLY TO MAP SOME OF THE ┴╙├╔╔ CODES TO THEIR CLOSEST
VISUAL EQUIVALENT.
├189 = ╙╦╔╨ ┬┴═ ┼NTRY.
╒SED TO SKIP THE ┬┴═ ENTRY WHEN READING A TRACK & SECTOR DIRECTORY.
├18├ = ╦╔╠╠ ╥╧╧═ ┼NTRY.
├LEARS ALL OCCURANCES OF A SPECIFIC MESSAGE INDEX CODE.
├18╞ = ╞╔╬─ ╔╬─┼╪ ╞╥╧═ ═┼╙╙┴╟┼ ╬╒═┬┼╥ ┼NTRY
╞INDS THE POSITION IN THE MESSAGE INDEX OF THE MESSAGE NUMBER
GIVEN BASED ON WHAT THE CURRENT ROOM IS.
├192 = ╙┼╘ ╒╨ ╥╧╧═ ┼NTRY
╞INDS INFORMATION ABOUT ROOM.
├195 = ╥╧╧═ ╚╧╒╙┼╦┼┼╨╔╬╟ ┼NTRY
├HECKS FOR UNUSED ROOMS.
├198 = ═┼╙╙┴╟┼-╔╬─┼╪ ╠╧┴─
╠OADS THE MESSAGE INDEX FROM THE ┬┴╙┼╙ FILE INTO MEMORY.
├19┬ = ═┼╙╙┴╟┼-╔╬─┼╪ ╙┴╓┼
╙AVES THE MESSAGE INDEX FROM MEMORY TO THE ┬┴╙┼╙ FILE.
├19┼ = ╥╧╧═ ╙╧╥╘
├REATES A SORTING INDEX FOR THE SIG/ROOM LIST.
├1┬┴-├╞╞╞ = ╙.2 ═ACHINE ╠ANGUAGE ═ODULE
─├08-─├0┬ - ╘╧─ ├LOCK #1 - ╒SED FOR TIME-OF-DAY.
──08-──0┬ - ╘╧─ ├LOCK #2 - ╒SED FOR USER'S SESSION TIMER
┼000-┼─┴┬ - ═ESSAGE INDEX.
┼ACH POSITION INDICATES THE ROOM NUMBER + #$40 OF EACH MESSAGE.
╞72├-╞─01 - ╙.6 ═ODULE (┴WAITING-CALL & SHAREWARE SCREEN DATA BUFFER).
╞─15-╞─46 - ╬EW ═ESSAGE ╨OINTERS (LOW BYTES)
╞─47-╞─78 - ╬EW ═ESSAGE ╨OINTERS (HI BYTES)
╘HESE LOCATIONS CONTAIN POINTERS TO THE NEWEST MESSAGES THAT
THE USER HAS READ FOR EACH ROOM. ╘HESE POINTERS ARE USED TO
COMPUTE THE NUMBER OF OLD AND NEW MESSAGES THE USER HAS.
╞─79-╞─┴┴ - ╬UMBER OF ═ESSAGES (LOW BYTES)
╞─┴┬-╞──├ - ╬UMBER OF ═ESSAGES (HI BYTES)
╘HESE LOCATIONS CONTAIN THE NUMBER OF MESSAGES IN EACH ROOM.
╫HEN THE USER ENTERS A DIFFERENT ROOM, A MACHINE LANGUAGE ROUTINE
LOOKS UP THE NUMBER AND STORES IT AT $02┼┼/02┼╞.
╞───-╞┼0┼ - ╬UMBER OF ╧LD ═ESSAGES (LOW BYTES)
╞┼0╞-╞┼40 - ╬UMBER OF ╧LD ═ESSAGES (HI BYTES)
╘HESE LOCATIONS CONTAIN THE NUMBER OF OLD MESSAGES IN EACH ROOM.
╫HEN THE USER ENTERS A DIFFERENT ROOM, A MACHINE LANGUAGE ROUTINE
LOOKS UP THE NUMBER, ADDS 1 TO IT (SO IT BECOMES THE MESSAGE NUMBER
OF THE FIRST NEW MESSAGE), AND STORES IT AT $02┬8/02┬9.
(┴LL OTHER ╥┴═ UNDER THE ╦ERNAL ╥╧═ IS AND MUST REMAIN A COPY OF THE ╦ERNAL
╥╧═. ╘HIS ALLOWS FOR THE USE OF THE ╬═╔ INTERRUPT ROUTINES WHEN THE ╥╧═ IS
SWITCHED OUT.)
------------------------------------------------------------------------------
╘HE FOLLOWING ╥╧═ VECTORS HAVE BEEN CHANGED:
0308/0309 - ╔╟╧╬┼ - ╘O ALLOW EXECUTION OF ┬┴╙╔├ EXTENSIONS.
0314/0315 - ╔╥╤ - ╘O ENABLE THE ┬┬╙ WINDOW AND CARRIER-DETECT ROUTINES.
0318/0319 - ╬═╔ - ╘O LESSEN THE CHANCE OF LOCKING UP THE COMPUTER IF THE
╥┼╙╘╧╥┼ KEY IS PRESSED, AND ALSO TO DISPLAY THE
DIAGNOSTIC SCREEN WITH ╥╒╬/╙╘╧╨ & ╥┼╙╘╧╥┼. ┴LSO HANDLES
╙WIFTLINK ╬═╔ ROUTINES IF ╙WIFTLINK IS ACTIVE.
031┴/031┬ - ╧╨┼╬ - ╘O ENABLE THE KERNAL OVERLAY.
031┼/031╞ - ├╚╦╔╬ - ╘O ALLOW THE USE OF DEVICE 4 TO READ THE EDIT BUFFER.
╒SED ONLY BY THE FILE SERVER WHEN LISTING THE EDIT
BUFFER.
0320/0321 - ├╚╦╧╒╘ - ╘O HANDLE THE PROPER CHANNEL NUMBER FOR THE ┬┬╙ OUTPUT
CHANNEL DEPENDING ON THE CARRIER MASK.
0326/0327 - ├╚╥╧╒╘ - ┬┬╙ OUTPUT DRIVER. ╚ANDLES ALL MODEM/DISPLAY OUTPUT.
032┴/032┬ - ╟┼╘╔╬ - ┬┬╙ INPUT DRIVER. ╚ANDLES ALL MODEM/KEYBOARD INPUT.
(┬┬╙ DOES NOT USE ├╚╥╔╬ FOR KEYBOARD OR ╥╙-232 INPUT!)
╨LEASE DO NOT CHANGE ANY VECTORS!
------------------------------------------------------------------------------
┬┴╙╔├ ╓ARIABLE ╠ISTING:
------------------------------------------------------------------------------
(╙INCE THE ┬┴╙╔├ ╥╧═ IS SWITCHED OUT WHEN EXECUTING A MODULE, YOU MUST DEVISE
YOUR OWN ROUTINE FOR ACCESSING VARIABLES IF YOU NEED TO.)
A - ├ONSTANT = 56577
A$ - ╘EMP - ╚AYES COMMAND TO SEND
A% - ┴CCOUNT - ╙╔╟-BULLETIN READ FLAGS
A0 - ╘EMP
AA - ╘EMP
AA$ - ┴CCOUNT - ┴CCESS
AC - ┴CCOUNT - ╬UMBER OF CALLS
AD - ┴CCOUNT - ╬UMBER OF DOWNLOADS
AD$ - ┴CCOUNT - ─ATE OF LAST CALL
AE - ┼DITOR MODE FLAG (USED TO DETERMINE WHERE EDITOR IS CALLED FROM)
AF - ┴CCOUNT - ┼MAIL FORWARDING ACCOUNT NUMBER
AH$ - ┴CCOUNT - ╬EW MESSAGE POINTERS (ENCODED)
AI - ┴CCOUNT - ╬UMBER OF MESSAGES POSTED (SYSTEM TOTAL)
AL - ┴CCOUNT - ╬UMBER OF BAD LOGOFFS.
AM - ┴CCOUNT - ╬UMBER OF MESSAGES POSTED (USER'S TOTAL)
AN$ - ┴CCOUNT - ╬AME
AN% - ┴CCOUNT - ╙AVED MESSAGES AS OLD OR NEW FLAG
AP$ - ┴CCOUNT - ╨ASSWORD
AS$ - ┴CCOUNT - ╙TATUS
AT - ┴CCOUNT - ─AILY TIME LIMIT
AT% - ┴CCOUNT - ╘IME USED TODAY (PREVIOUS SESSIONS ONLY)
AU - ┴CCOUNT - ╬UMBER OF UPLOADS
AV - ┴CCOUNT - ╓IDEO ╫IDTH
AX - ╘EMP
AX$ - ┴CCOUNT - ╨ROTOCOL
B = ┬AUDRATE ╓ALUE
(╘HE NUMERIC VALUE OF THE BAUDRATE.)
B$(*) = ╥OOM ╬AME ┴RRAY
(╓ALID INDEX IS 1 TO 50. ╒NUSED ROOMS ARE NULL.)
B(*) = ╥OOM ╙TATUS ┴RRAY
(╓ALID INDEX IS 1 TO 50. ╘HE VALUE RETURNED IS AS FOLLOWS:
BITS 0-3 = ╙╔╟ ROOM IS ASSIGNED TO (0 MEANS ROOM NOT IN USE),
BIT 4 =
BIT 5 = ╠OGOFF MESSAGE ROOM FLAG,
BIT 6 = ╥EAD-ONLY FLAG,
BIT 7 = ╠OCKED ROOM FLAG.
╬OTE THAT AN UNUSED ROOM MAY BE LOCKED SO THAT IT CANNOT BE
CREATED.)
BN = ├URRENT ROOM INDEX NUMBER
(╓ALID NUMBER IS 1 TO 50. 0 MEANS USER IS NOT IN A ROOM.)
C$ - ╠AST COMMAND SEQUENCE ENTERED.
CA - ├ARRIER STATUS (USED IN ├╚┴╘ MODE)
CC - ├ARRIER ─ETECT ┬IT ═ASK
CM - ├OMMAND-ENTERED FLAG (OTHER THAN CHAT OR DOWNLOAD)
CN = ╬UMBER OF CALLS RECEIVED.
D - ╘EMP - ─RIVE
D$ - ╘EMP - ─ATE STRING (INCLUDES DAY OF WEEK)
D$(*) = ╙╔╟ ┬ULLETIN ─ATE-LAST-MODIFIED ┴RRAY
(╙TRING IN ┘┘══── FORMAT.)
D% = ╒SER - ╙╔╟-BULLETIN READ FLAGS
(┼ACH BIT REPRESENTS A ╙╔╟ BULLETIN THAT THE USER HAS READ.)
D%(*) = ═ESSAGE/DRIVE ┴LLOCATION ┴RRAY
(╓ALID INDEX IS 0 TO 25 FOR DRIVES A TO Z. ┼ACH ENTRY INDICATES
THE NUMBER OF MESSAGES ON THAT DRIVE.)
DB - ─EFAULT BAUDRATE
DD = ─AY ╧F ═ONTH
(┬ETWEEN 1 AND 7, STARTING AT ╞RIDAY.)
DW = ─AY ╧F ╫EEK
(1 TO 31.)
E - ╘EMP - ─╧╙ ┼RROR ╬UMBER
E$ - ╘EMP
E(*) = ┼MAIL ╘YPE/╥ECEIVER ─ATA ┴RRAY
(╓ALID INDEX FROM 1 TO VARIABLE ME. ╓ALUE IS ACCOUNT NUMBER
PLUS 1024 IF CERTIFIED, PLUS 3072 IF URGENT. 0 INDICATES AN
AVAILABLE EMAIL SLOT.)
E2$ - ╘EMP - ─╧╙ ┼RROR ├HANNEL ┬UFFER
ED(*) = ┼MAIL ─ATE-SENT ┴RRAY
(╓ALID INDEX FROM 1 TO VARIABLE ME. ╓ALUE IS DATE IN ┘┘┘┘══──
FORMAT. 0 INDICATES AN AVAILABLE EMAIL SLOT.)
EN$ - ├ONSTANT = "┼NTER "
EU - ┼MAIL ┴CCOUNT TO ╥EAD
F$ - ╘EMP - ╞ILENAME
F1$ - ╘EMP - ╞ILENAME
F2$ - ╘EMP - ╞ILENAME
FA = ╞IRST ┴VAILABLE ┴CCOUNT ╬UMBER
FD - ╠AST ═ESSAGE ┼DITTED (┼ITHER DRIVE OR BASE INDEX NUMBER)
G$ - ╘EMP - ├URRENT ╙╔╟ ╠ETTER
H$ = ╚AYES ┼SCAPE ╙EQUENCE ┴╙├╔╔ ├HARACTER
(╘HE CHARACTER MUST BE SENT 3 TIMES FOR THE ╚AYES ESCAPE
SEQUENCE.)
HH$ = ╚AYES ╚ANGUP ╙EQUENCE
(╚AYES COMMAND TO SEND AFTER SENDING THE ESCAPE SEQUENCE.)
HI = ╔NDEX TO ╬EXT ═ESSAGE TO ╙AVE
(╒SED TO DETERMINE THE START/END POINTS OF THE MESSAGE INDEX
BUFFER. ╘HIS IS A POINTER TO THE NEXT MESSAGE TO BE SAVED. ╔T
ALSO POINTS TO THE OLDEST MESSAGE IN THE SYSTEM ONCE THE MESSAGES
HAVE STARTED CYCLING.)
HL = ═AX ╬UMBER OF ═ESSAGES ├ONFIGURED ╞OR
I - ╘EMP
I$ - ╘EMP - ╠INE ┼DITOR ╔NPUT ╙TRING
I1 - ╘EMP
I2 - ╘EMP
I3 - ╘EMP
ID - ╞ILE ╙ERVER & ┼DITOR ╔NTERRUPT ╘YPE
II$ - ╘EMP - ╠INE ┼DITOR ╔NPUT ╙TRING (╒PPERCASE)
J - ╘EMP
J$ - ╘EMP - ╫INDOW ┬UILDER
K$ - ├ONSTANT = "------"
L - ╘EMP - ╠INE ┼DITOR ═AXIMUM ╠ENGTH
L$ - ╘EMP
LB$ - ├ONSTANT = ":A.╠╧╟┬╧╧╦"
LC$ = ╠AST ├ALLER'S ╬AME
LG = ╠OGOFF ═ESSAGES ┴VAILABLE FLAG
(┴NY NON-ZERO VALUE MEANS LOGOFF MESSAGES ARE AVAILABLE.)
LM$ - ├ONSTANT = ":E-SYS"
LS - ╘EMP
LT = ╠T╦ERNAL ╥╧═ FLAG
(┴NY NON-ZERO VALUE INDICATES THE PRESENCE OF A ╠T╦ERNAL
HARD DRIVE. ╞OR FUTURE USE OF ╠T╦ERNAL HARD DRIVES.)
M$ - ├ONSTANT - ├╚╥$(13)
M0$ = ╚AYES ┬┬╙ ╔NITIALIZATION ╙EQUENCE
(┼ACH COMMAND SENT IS SEPARATED WITH A SPACE.)
M1$ = ╚AYES ╘ERMINAL ╔NITIALIZATION ╙EQUENCE
(┼ACH COMMAND SENT IS SEPARATED WITH A SPACE.)
M3$ = ╚AYES ═ODEM ╧FF-HOOK ╙EQUENCE
ME = ═AXIMUM ╨IECES ╧F ┼MAIL
MM = ═ONTH
(1 TO 12. 0 INDICATES ┬┬╙ IS DISABLED.)
MN = ╬UMBER ╧F ═ESSAGES ╔N ╥OOM
MP = ╬UMBER ╧F ═ESSAGES ╨OSTED
(╘HIS IS THE SYSTEM TOTAL. ╓ARIABLE HI IS DERIVED FROM THIS
VARIABLE.)
MS$ - ├ONSTANT = "ESSAGE"
N$
N% = ╒SER - ╙AVED MESSAGES AS OLD OR NEW FLAG
(┴NY NON-ZERO VALUE WILL MAKE SAVED MESSAGES AS NEW.)
N(*) = ╒SER - ╬EW MESSAGE POINTERS
(╓ALID INDEX IS 1 TO 50 REPRESENTING ROOM NUMBERS. ┼ACH ARRAY
ELEMENT IS A POINTER TO THE LAST MESSAGE READ IN THE ROOM. ╘HIS
ARRAY IN CONJUNCTION WITH VARIABLES MP AND UI TELL THE ┬┬╙ WHICH
MESSAGES ARE NEW.)
NA$ - ├ONSTANT = "╬╬╬╬╬╬╬╬╬╬╬╬╬╬" (USED TO CHECK FOR MINIMUM ACCESS)
NB - ═ESSAGE ╬UMBER
NM = ╬UMBER ╧F ╬EW ═ESSAGES ╔N ╥OOM
(╔F 0, THEN ROOM IS EMPTY.)
NM$ = ╬EW ╒SER ╤UESTIONAIRE ╬AME ╨ROMPT
(I.E. "╬AME:", "╚ANDLE:", ETC.)
O$ - ├ONSTANT - ├╚╥$(0)
P$ - ├ONSTANT - "RESS ╥┼╘╒╥╬"
PS - ═ESSAGE ╔NDEX
Q - ╘EMP
Q$ - ╘EMP
Q$(*) - ┴NSWERS TO ╤UESTIONAIRE
Q0 - ╘EMP - ├URRENT ╤UESTION ╨OINTER
QA$(*) - ╬EW ╒SER ╤UESTIONAIRE
QB(*) - ═AXIMUM ╬UMBER OF ├HARACTERS ┴LLOWED IN ╤UESTIONAIRE
QQ - ╬UMBER OF ╤UESTIONS IN ╤UESTIONAIRE
R - ├ONSTANT = 50 (═AXIMUM ╬UMBER OF ╥OOMS - DO ╬╧╘ CHANGE)
R1 - ╘EMP - ╙TARTING ═ESSAGE IN ╙EQUENCE
R2 - ╘EMP - ┼NDING ═ESSAGE IN ╙EQUENCE
S$ - ╥OOM/╙╔╟ ╙ORT ╔NDEX
S$(*) = ╙╔╟ ╬AME ┴RRAY
(╓ALID INDEX IS 0 TO 14. ╘HIS ARRAY CONTAINS THE NAMES OF EACH
╙╔╟. ┴ NULL SIGNAME IS A HIDDEN ("DELETED") ╙╔╟.
S1 = ─EFAULT ╓IDEO ╫IDTH
(╓ALID VIDEO WIDTH IS 20 TO 80. ╨LEASE DO NOT EXCEED THIS RANGE.)
S1$ = ╥ECOVERY ╨ASSWORD
(╒SED FOR REMOTE ENABLING.)
S2 = ═AXIMUM ╬UMBER OF ╒SERS
(╓ALID NUMBER IS FROM 1 TO 999. ─O NOT EXCEED 999.)
S2$ = ╬EW ╒SER ┴CCESS
S3 = ─EFAULT ╘IME ╠IMIT
(─EFAULT DAILY TIME LIMIT.)
S3$ = ╒NLOGGED-ON ╒SER ┴CCESS
S4 = ┴CCOUNT DRIVE
(┴╙├╔╔ VALUE OF DRIVE LETTER.)
S5 = ┼MAIL DRIVE
(┴╙├╔╔ VALUE OF DRIVE LETTER.)
S6$ = ╙╔╟ ─OWNLOAD DRIVES
(15 DRIVE LETTERS.)
S8 = ├URRENT UPLOAD DRIVE
(┴╙├╔╔ VALUE OF DRIVE LETTER.)
S8$ = ╙╔╟ ╒PLOAD DRIVES
(15 DRIVE LETTERS.)
S9 = ═ODEM TYPE
(1 = 1650 OR COMPATABLE,
2 = 1670/╚AYES OR COMPATABLE,
3 = 1660 OR COMPATABLE.)
SC$ - ├ONSTANT = "├╚╘├┼╬═╧╬╬┼╫╨┴╙├╥┼╞╒╠╙┘╙" (╙YSTEM ├ONTROL ┬LOCK TEXT)
SF = ╠OGOFF ═ESSAGE DRIVE
(┴╙├╔╔ VALUE OF DRIVE LETTER.)
SL = ╠OGOFF ═ESSAGE ROOM
(├ONTAINS THE ROOM NUMBER OF THE ROOM THAT LOGOFF MESSAGES ARE TO
BE SAVED TO. ╠OGOFF MESSAGES ARE SAVED TO "E.SYS" FILE IF THIS
VARIABLE IS 0. ╘HE ┬┬╙ SCANS THE ROOM STATUS ARRAY AND STORES THE
APPROPRIATE VALUE HERE.)
T - ╘EMP / ╬UMBER OF TRIES LEFT / ╠OGOFF TYPE
T0 - ╘EMP
T1 - ╘EMP
T2 = ╒SER - ╘IME ╧NLINE ╘ODAY (╘OTAL)
(├URRENT AMOUNT OF TIME, IN MINUTES, THAT THE USER HAS BEEN ONLINE
TODAY. ╒SED IN CONJUNCTION WITH VARIABLE UD$ (TO DETERMINE IF USER
HAS BEEN ONLINE TODAY OR IF USER'S TIMELIMIT CAN BE RESET).)
TW = ╒SER - ╘WIT ╠EVEL
(╓ALID RANGE BETWEEN 0 AND 255.)
U = ╒SER - ┴CCOUNT ╬UMBER
(╓ALID RANGE BETWEEN 0 AND 999. ╔F ZERO, THEN USER IS NOT LOGGED
ON.)
U$ - "╙YSOP" OR "╙╔╟OP" (─ISPLAYED WHEN [.] COMMAND IS SELECTED.)
UA = ┴CCESS LEVEL IN CURRENT ROOM
(├URRENT ACCESS VALUE DERIVED FROM VARIABLES UA$ AND B(BN).
1 = ╬O ACCESS,
2 = ╥EAD-ONLY ACCESS,
3 = ╫RITE ACCESS,
4 = ├REATE ACCESS,
5 = ╙╔╟OP ACCESS.)
UA$ = ╒SER - ┴CCESS
UC = ╒SER - ╬UMBER OF CALLS
UD = ╒SER - ╬UMBER OF DOWNLOADS
UD$ = ╒SER - ─ATE LAST CALLED
(─ATE IN ┘┘══── FORMAT. ╒SED IN CONJUNCTION WITH ARRAY N .)
UF = ╒SER - ┼MAIL FORWARDING ACCOUNT NUMBER
(╓ALID RANGE BETWEEN 0 AND 999.)
UI = ╒SER - ╬UMBER OF MESSAGES POSTED AT LAST CALL (SYSTEM TOTAL)
(├ONTAINS VALUE OF VARIABLE MP AT TIME OF USER'S LAST LOGOFF.
╒SED TO DETERMINE IF ALL MESSAGES ARE NEW.)
UL = ╒SER - ╬UMBER OF BAD LOGOFFS.
UM = ╒SER - ╬UMBER OF MESSAGES POSTED (USER'S TOTAL)
UN$ = ╒SER - ╬AME
UP$ = ╒SER - ╨ASSWORD
US$ = ╒SER - ╙TATUS
UT = ╒SER - ─AILY ╘IME ╠IMIT
UT% = ╒SER - ╘IME ╒SED ╘ODAY (PREVIOUS SESSIONS ONLY)
(├ONTAINS THE VALUE OF VARIABLE T2 AT TIME OF USER'S LAST
LOGOFF.)
UU = ╒SER - ╬UMBER OF UPLOADS
UX$ = ╒SER - ╨ROTOCOL
(═UST CONTAIN THE NAME OF A PROTOCOL, EVEN IF PROTOCOL DOES NOT
EXIST.)
X - ╘EMP - ─ISK ╙PACE ┴VAILABLE
X$ = ─ATE AND ╘IME / ╘EMP
(─ATE AND TIME IN FORMAT "┘┘══── AT ╚╚:══?═".)
XM$ - ╠AST ═ESSAGE ┼DITTED (╞ILENAME OF MESSAGE)
YY = ┘EAR
(╓ALID RANGE IS 0 TO 99. ┴NY VALUE LESS THAN 81 IS IN THE 21ST
CENTURY.)
Z$ - ╘EMP
ZR$ - ├ONSTANT = "000000" (USED TO CHECK IF ┬┬╙ DISABLED)
╔F THE ┬┬╙ CRASHES WITH AN ERROR, OR DOES A WARM START, YOU MAY DISPLAY THE
VALUE OF ANY VARIABLE WITH THE ╨╥╔╬╘ COMMAND.
------------------------------------------------------------------------------
═ODULE ╨ROGRAMMING ╟UIDE:
═ODULE FILES ARE LOCATED ON A ╙╔╟-FILE DRIVE SO THAT EACH ╙╔╟ CAN HAVE IT'S
OWN SET OF MODULES. ┼ACH MODULE MAY BE WRITTEN USING ANY ├64 ASSEMBLER. ╘HE
MODULES MUST BE GIVEN A FILENAME CONSISTING OF A ╙╔╟ LETTER, A PERCENT SIGN,
AND THE NAME OF THE MODULE IN UPPERCASE LETTER, I.E. "A%╓╧╘┼". ╘HE ┬┬╙ WILL
LOAD A MODULE OF ANY SEQUENTIAL FILE TYPE (╨╥╟, ╙┼╤, OR ╒╙╥).
═ODULES ARE RUN ONLINE BY USING THE COMMAND
┼[╪]EC: <MODULENAME>
AT THE ├╧══┴╬─ PROMPT. ┬Y LEAVING OUT THE MODULENAME, A DESCRIPTION FILE WILL
BE DISPLAYED. ╘HE FILENAME OF THIS FILE CONSISTS OF THE ╙╔╟ LETTER AND A
PERCENT SIGN. ╘HIS FILE SHOULD BE LOCATED ON THE ╙╔╟FILE DRIVE AND IT SHOULD
CONTAIN A LIST OF AVAILABLE MODULES.
╫HEN WRITING MODULES FOR THE ─╘╩-┬┬╙, YOU SHOULD OBSERVE THE FOLLOWING
GUIDELINES:
1. ╘O HELP MAINTAIN COMPATABILITY WITH FUTURE REVISIONS OF THE ─╘╩-┬┬╙, TRY
NOT TO READ OR MODIFY ANY MEMORY LOCATIONS MENTIONED IN THE MEMORY MAP
EXCEPT FOR THE ONES LABEL "╘EMPORARY WORK SPACE", "╘EMPORARY WORK
POINTER", OR THOSE MEMORY LOCATIONS MENTIONED BELOW. ╔F THE MEMORY
LOCATIONS OTHER THAN THE TEMPORARY LOCATIONS ARE CHANGED, THEY MUST BE
RESTORED TO THEIR ORIGINAL VALUES UPON EXITING THE MODULE.
2. ╘HE ┬┬╙ KEEPS THE FOLLOWING FILES OPEN AT ALL TIMES:
╞ILE 2 = ┬┬╙ ╔NPUT/╧UTPUT ├HANNEL
╞ILE 4 = ╨RINTER ╧UTPUT/┼DIT-┬UFFER ╔NPUT
─O NOT CLOSE THESE FILES! ┴LL OTHER FILE NUMBERS ARE AVAILABLE FOR YOUR
USE. ╚OWEVER, IF YOU OPEN A FILE, CLOSE IT BEFORE EXITING YOUR MODULE.
3. ═ODULES ARE LOADED INTO THE EDIT BUFFER MEMORY. ═ODULES MUST LOAD AND
EXECUTE AT $┴001. ═ODULE SIZE MAY BE LARGER THAN THE CONFIGURED SIZE OF
THE EDIT BUFFER (IN THE S.1 FILE), BUT IT MAY NOT EXCEED THE MAXIMUM SIZE
OF THE EDIT BUFFER (4095 BYTES). ╙INCE MODULES ARE LOCATED UNDER ┬┴╙╔├
╥╧═, YOU CANNOT ACCESS ANY ┬┴╙╔├ ╥╧═ ROUTINES WITHOUT BRANCHING OUT FROM
UNDER THE ┬┴╙╔├ ╥╧═ AND THEN SWITCHING THE ┬┴╙╔├ ╥╧═ IN TEMPORARILY. ┴LL
MODULES MUST EXIT WITH AN ╥╘╙ INSTRUCTION.
4. ╒SE THE DOCUMENTED ╦ERNAL ╥╧═ VECTORS AS MUCH AS POSSIBLE. ╘HIS APPLIES
ESPECIALLY TO THE ╥╙-232 ╔/╧ ROUTINES.
5. ┴NY DISK ACCESS SHOULD OPEN FILES USING DEVICE NUMBERS COORESPONDING TO
THE ┴╙├╔╔ VALUES OF THE DRIVE LETTERS (┴=65, ┬=66, ETC). ╧NCE THE FILE
HAS BEEN OPEN, THE ┬┬╙'S KERNAL OVERLAY WILL CONVERT THE LOGICAL DRIVE
NUMBER INTO A PHYSICAL DEVICE NUMBER SO THAT LOCATION $┬┴ WILL CONTAIN
THE ACTUAL DEVICE NUMBER AS IT USUALLY DOES.
6. ╘HE SOFTWARE ╩IFFY CLOCK VALUES MAY BE CHANGED AND DO NOT HAVE TO BE
RESTORED WHEN RETURNING CONTROL TO THE ┬┬╙.
7. ─O NOT TURN INTERRUPTS OFF, OR MODIFY INTERRUPT ROUTINES. ╘HE ┬┬╙ USES THE
╔╥╤ ROUTINE TO DISPLAY THE WINDOW AT THE TOP OF THE SCREEN AND TO CHECK FOR
CARRIER. ╘HE ╬═╔ ROUTINE IS USED FOR ╥╙-232 COMMUNICATIONS.
8. ╘O PREVENT LOCKUP PROBLEMS, ALWAYS CHECK FOR CARRIER IN ALL LOOPS THAT DO
NOT EXIT IN A SHORT PERIOD OF TIME. ├ARRIER MAY BE CHECKED BY CALLING THE
FOLLOWING SUBROUTINE:
CARRIER
; GET RS-232 STATUS.
LDA $9FE7
; MASK ALL BITS EXCEPT THE CARRIER BIT.
AND #$10
; MASK RESULT WITH CARRIER-DETECT MASK (FORCE CARRIER IF IN
; CONSOLE MODE). SINCE DOING A FILE TRANSFER WHILE IN CONSOLE
; MODE IS USELESS (RS-232 I/O IS DISABLED), LEAVE THIS INSTRUCTION
; OUT IF YOU ARE WRITING A PROTOCOL MODULE.
AND $02A9
; EXIT SUBROUTINE.
RTS
╘HIS SUBROUTINE WILL RETURN ZERO SET (REGISTER ┴=0) IF CARRIER IS PRESENT,
OR ZERO CLEARED (REGISTER ┴=16) IF CARRIER IS NOT PRESENT. ╔F CARRIER IS
NOT PRESENT, THE MODULE SHOULD CLOSE ALL FILES AND EXIT. ╘HE ┬┬╙ WILL THEN
HANDLE THE CARRIER-DROP. ─O NOT CHECK CARRIER AT LOCATION $──01 AS SOME
MODEMS/INTERFACES MAY USE REVERSE CARRIER AND ALSO THIS LOCATION IS NOT
USED WITH THE ╙WIFTLINK-232 CARTRIDGE.
9. ╘HE ─╘╩-┬┬╙ DOES NOT USE A FULL 256-BYTE ╥╙-232 OUTPUT BUFFER. ╘HIS IS TO
HELP PREVENT GARBLING PROBLEMS WITH THE SOFTWARE ╥╙-232 ROUTINES. ╘HE
╙WIFTLINK MODE ALSO DOES NOT USE AN OUTPUT BUFFER. ╘HIS KEEPS THE ╬═╔
ROUTINE AS SHORT AS POSSIBLE AND ALLOWS FOR MORE COMPATABLITY WITH THE
SOFTWARE ╥╙-232 ROUTINES. ╘HE FULL 256-BYTE INPUT BUFFER IS USED HOWEVER,
WITH BOTH SOFTWARE AND ╙WIFTLINK ╥╙-232 MODES. ╨LEASE DO NOT MANIPULATE
THE ╔/╧ BUFFERS DIRECTLY. ╒SE THE ╦ERNAL ╔/╧ ROUTINES.
10. ╘HE ╙WIFTLINK'S RECEIVER SECTION IS DISABLED DURING ALL SERIAL PORT ACCESS
TO PREVENT SERIAL PORT TIMING PROBLEMS. ╘HE RECEIVER IS ENABLED VIA THE
╦ERNAL ├╠╥├╚╬ ROUTINE. ┴LWAYS REMEMBER TO CALL ├╠╥├╚╬ AFTER A DISK ACCESS
IF YOU WANT TO BE ABLE TO RECEIVE CHARACTERS FROM THE MODEM.
11. ╘HE ╙WIFTLINK ╬═╔ ROUTINE STORES BITS 0 THROUGH 3 OF THE STATUS REGISTER TO
LOCATION $0297 SO YOU CAN USE THIS LOCATION AS YOU WOULD NORMALLY.
╠OCATION $02┴1 IS NOT USED IN ╙WIFTLINK MODE.
12. ╒SE ╟┼╘╔╬, NOT ├╚╦╔╬, FOR ALL FILE #2 (MODEM/KEYBOARD) INPUT.
13. ┘OU MAY FIND THE ┬┴╙╔├ VARIABLES LISTED ABOVE WITH A "=" AFTER THE
VARIABLE NAME USEFUL. ╙INCE THE ┬┴╙╔├ ╥╧═ IS SWITCHED OUT, YOU WILL HAVE
TO DEVISE YOUR OWN METHOD OF ACCESS THE VARIABLE YOU WANT TO USE. ╓ARIABLE
POSITIONS MAY VARY SO YOU SHOULD ALWAYS SEARCH FOR A VARIABLE BY NAME.
─O NOT ASSUME THAT A GIVEN VARIABLE WILL ALWAYS BE IN THE SAME LOCATION
IN THE VARIABLE AREA IN FUTURE REVISIONS. ╔N MOST CASES, YOU SHOULD NOT
CHANGE THE VALUE OF A VARIABLE.
14. ─O NOT CALL ┬┴╙╔├'S RANDOM NUMBER GENERATOR. ╘HE MEMORY LOCATION USED TO
STORE THE SEED VALUE IS BEING USED FOR OTHER PURPOSES.
------------------------------------------------------------------------------
╨ROTOCOL ═ODULE ╨ROGRAMMING ╟UIDE:
╨ROTOCOL FILES ARE A MORE SPECIALIZED FORM OF MODULE. ╘HE FILENAME OF A
PROTOCOL MODULE CONSISTS OF "P-" FOLLOWED BY THE PROTOCOL NAME IN UPPERCASE
LETTERS. ╘HESE FILES ARE LOCATED ON DRIVE ┴.
╔N ADDITION TO THE ABOVE GUIDELINES, THE FOLLOWING APPLIES TO PROTOCOL FILES:
15. ╘HE ─╘╩-┬┬╙ OPENS THE FILE TO BE RECEIVED OR SENT BEFORE CALLING THE
PROTOCOL MODULE ROUTINE. ╘HE FILE NUMBER IS 8. ╘HE COMMAND CHANNEL IS
ALSO OPEN USING FILE NUMBER 1.
(╔N THE FUTURE, THIS WILL CHANGE IF/WHEN MULTI-FILE TRANSFERS ARE
IMPLIMENTED. ╞ILE 8 WILL BE A ╨╥╟-FORMAT DIRECTORY FILE AND FILE 1
WILL BE CLOSED. ╘HE LOADING ADDRESS MAY CHANGE TO $┴000 OR $┴002 TO
FORCE INCOMPATABILITY WITH THE OLD MODULES. ╘HIS IS TO PREVENT PROBLEMS
WITH RUNNING MULTI-FILE TRANSFERS ON AN OLDER ┬┬╙ THAT CAN'T HANDLE THEM.)
16. ╘HE PROTOCOL MODULE MUST CONTAIN BOTH SEND AND RECEIVE ROUTINES. ╘HE
RECEIVE ROUTINE MUST START AT $┴001 AND THE SEND ROUTINE MUST START AT
$┴004.
17. ╒NLESS THE PROTOCOL IS AN ┴╙├╔╔ TRANSFER, BOTH THE SEND AND RECEIVE ROUTINES
MUST TURN ┴╙├╔╔ TRANSLATION OFF. ┼CHO SHOULD ALSO BE TURNED OFF. ═AKE
SURE YOU TURN TRANSLATION AND ECHO BACK ON WHEN THE TRANSFER IS FINISHED.
╘RANSLATION AND ECHO CONTROL IS AT $02┴7.
18. ┬OTH SEND AND RECEIVE ROUTINES USE THE ┴ REGISTER TO INDICATE THE SUCCESS
OF THE TRANSFER UPON EXITING THE MODULE:
#$00 = FILE TRANSFER COMPLETE - NO ERROR
#$01 = ERROR - TIMEOUT
#$02 = ERROR - CANCELLED BY USER
#$03 = ERROR - CANCELLED BY SYSOP
#$04 = ERROR - OTHER (UNUSED)
#$05 = ERROR - DISK FULL
#$10 = ERROR - CARRIER DROP
┴NY NON-ZERO STATUS ON A FILE RECEIVE WILL CAUSE THE ┬┬╙ TO SCRATCH THE
FILE.
╬OTE THAT THE ROUTINE DESCRIBED EARLIER TO CHECK FOR CARRIER WILL SET ┴ TO
#$10 FOR YOU IF CARRIER IS DROPPED. ╥EMEMBER TO LEAVE THE "AND $02A9"
INSTRUCTION OUT OF YOUR CARRIER DETECT ROUTINE WHEN WRITING A PROTOCOL
MODULE.
19. ═AKE SURE YOU CHECK FOR CARRIER AND IMPLIMENT TIMEOUTS IN ALL LOOPS TO
PREVENT TOO MUCH IDLE TIME BEING WASTED.
20. ╒SE THE SOFTWARE JIFFY CLOCK FOR TIMING.
21. ╘RY NOT TO BUFFER TOO MANY BLOCKS IN MEMORY AT A TIME. ┴LOT OF FILE
TRANSFER PROTOCOLS WRITTEN FOR THE ├OMMODORE BUFFER UP TO 16 BLOCKS OR MORE
IN MEMORY BEFORE WRITING TO DISK OR SENDING TO THE MODEM. ╘HIS SLOWS DOWN
THE FILE TRANSFER. ╔NSTEAD, WHEN SENDING DATA, READ ONE OR TWO BLOCKS OF
DATA FROM THE DISK AS YOU NEED IT. ╫HEN RECEIVING DATA, WRITE IT TO DISK
AS SOON AS IT HAS BEEN VERIFIED CORRECT.
22. ┘OUR PROTOCOL MODULE SHOULD DISPLAY THE STATUS OF THE TRANSFER ON THE
SCREEN AS IT GOES. ╘RY NOT TO USE THE WHOLE SCREEN. ┴T A MINIMUM, YOU
SHOULD DISPLAY THE NUMBER OF BLOCKS SENT OR RECEIVED.
23. ╨ROVIDE SOME WAY FOR THE SYSOP AND USER TO ABORT THE TRANSFER. ┴ ├╧╬╘╥╧╠-╪
WOULD CONFORM TO THE ORIGINAL ─╘╩ XMODEM'S WAY OF ABORTING THE TRANSFER.
╔F YOU THINK A ├╧╬╘╥╧╠-╪ IS TOO EASY TO ABORT THE TRANSFER BY ACCIDENT, THEN
TRY TWO ├╧╬╘╥╧╠-╪'S IN A ROW WITHIN A LIMITTED AMOUNT OF TIME. ╥EMEMBER TO
SET REGISTER ┴ TO THE APPROPRIATE VALUE WHEN EXITING.
24. ╘HE MAXIMUM NUMBER OF 254-BYTE DISK BLOCKS THAT CAN BE SAVED TO DISK WHEN
RECEIVING A FILE IS STORED AT LOCATIONS $02┬2 AND $02┬3 (IN LOW/HIGH BYTE
ORDER). ┼XCEEDING THIS LIMIT BY ABOUT 12 BLOCKS MAY RESULT IN A CORRUPTED
DISK. (12 BLOCKS WAS CHOSEN TO PROVIDE A SAFETY ZONE.) ╘HE PROTOCOL
SHOULD ABORT WHEN THIS LIMIT HAS BEEN REACHED. ┬EFORE THE TRANSFER BEGINS,
YOU CAN MULTIPLY OR DIVIDE THIS MEMORY LOCATION TO GET THE NUMBER OF FILE
TRANSFER BLOCKS (I.E. MULTIPLY BY 2 TO GET THE APPROXIMATE NUMBER OF 128-
BYTE XMODEM BLOCKS).
25. ╫HEN THE TRANSFER IS COMPLETE, YOU SHOULD CLOSE FILES 8 AND 1. ╔F THE
TRANSFER WAS NOT A SUCCESS, YOU DON'T HAVE TO DELETE THE FILE. ╘HE ┬┬╙
WILL DO THAT FOR YOU IF THE PROTOCOL MODULE EXITS WITH THE ┴ REGISTER
HOLDING A NON-ZERO VALUE.
------------------------------------------------------------------------------
═ODULE ╨ROGRAMMING ┼XAMPLES:
; ----------------------------------------------------------------------------
; ╘URNING ┴╙├╔╔ TRANSLATION AND SCREEN ECHO OFF AND ON. (╒SED WHEN
; WRITING A FILE TRANSFER PROTOCOL.)
LDA $02┴7 ; GET CURRENT ┬┬╙ ╔/╧ STATUS
PHA ; SAVE IT ON STACK FOR LATER RESTORAL
LDA #$00 ; VALUE TO TURN TRANSLATION AND ECHO OFF
STA $02┴7 ; STORE BACK INTO ┬┬╙ ╔/╧ STATUS
STA $008┼ ; TURN "QUICK-KEYS" OFF.
: ; YOUR CODE GOES HERE
PLA ; RESTORE OLD ┬┬╙ ╔/╧ STATUS
STA $02┴7 ;
; ╘HE ┬┬╙ WILL RESTORE THE VALUE OF $008┼ WHEN IT EXITS THE MODULE; YOU DON'T
; HAVE TO SAVE IT.
; ----------------------------------------------------------------------------
; ╟ETTING TYPED-IN INPUT FROM A USER. (╒SED WHEN WRITING AN INTERACTIVE
; MODULE SUCH AS A VOTING BOOTH, QUESTIONAIRE, ETC.)
BUFFER = $├000
_╟┼╘├╚┴╥ = $├17─
├╠╥├╚╬ = $╞╞├├
├╚╦╔╬ = $╞╞├6
├╚╦╧╒╘ = $╞╞├9
├╚╥╧╒╘ = $╞╞─2
╒╔╬╨╒╘
JSR ├╠╥├╚╬ ; CLEAR ╔/╧ CHANNELS IF NEEDED
LDX #$02 ; SETUP ┬┬╙ ╔/╧
JSR ├╚╦╔╬
LDX #$02
JSR ├╚╦╧╒╘
LDY #$00 ; RESET BUFFER POINTER
╠╧╧╨
JSR _╟┼╘├╚┴╥ ; GET A CHARACTER FROM THE USER
BCS ┼╪╔╘ ; EXIT MODULE IF CARRY IS SET
CMP #$0─ ; ╥┼╘╒╥╬ KEY?
BEQ ├╥ ; EXIT INPUT ROUTINE IF YES
CMP #$14 ; ─┼╠ KEY?
BEQ ─┼╠
CMP #$20 ; INVALID CONTROL CHARACTER?
BCC ╠╧╧╨ ; IGNORE AND GET ANOTHER CHARACTER IF YES
CPY #40 ; 40 CHARACTERS ENTERED ALREADY? (┘OU MAY CHANGE
; THIS VALUE IF DESIRED.)
BCS ╠╧╧╨ ; IGNORE AND GET ANOTHER CHARACTER IF YES
JSR ├╚╥╧╒╘ ; ECHO CHARACTER TO USER
STA BUFFER,Y ; STORE CHARACTER IN INPUT BUFFER
INY ; INCREMENT BUFFER POINTER
BNE ╠╧╧╨ ; GET ANOTHER CHARACTER
─┼╠
CPY 0 ; IS BUFFER EMPTY?
BEQ ╠╧╧╨ ; INGORE AND GET ANOTHER CHARACTER IF YES
JSR ├╚╥╧╒╘ ; ECHO ─┼╠ CHARACTER TO USER
DEY ; DECREMENT BUFFER POINTER
BPL ╠╧╧╨ ; GET ANOTHER CHARACTER
├╥
JSR ├╚╥╧╒╘ ; ECHO CARRIAGE RETURN TO USER
LDA #$00 ; STORE A NULL AFTER BUFFER CHARACTERS (OPTIONAL)
STA BUFFER,Y
┼╪╔╘
RTS ; EXIT INPUT SUBROUTINE
; ╘HIS SUBROUTINE ASSUMES ┬┬╙ ╔/╧ CONTROL ($02┴7) IS SET FOR TRANSLATION AND
; ECHO ON. "BUFFER" POINTS TO AN AREA OF MEMORY SUFFICIENTLY LARGE ENOUGH
; TO CONTAIN ALL THE CHARACTERS THE USER CAN TYPE IN. ╒PON EXITING THIS
; SUBROUTINE, REGISTER ┴ CONTAINS #$0─, ┘ CONTAINS THE NUMBER OF CHARACTERS
; TYPED IN, AND THE CHARACTERS THEMSELVES ARE STORED AT "BUFFER". ╔F THIS
; SUBROUTINE EXITS WITH CARRY SET, THEN YOU SHOULD EXIT THE MODULE AS SOON
; AS POSSIBLE. ╬OTE THAT CALLS TO _╟┼╘├╚┴╥ WILL RESET THE JIFFY CLOCK. ╔F
; CARRIER IS DROPPED WHILE IN THIS ROUTINE, CARRY WILL BE SET, SO THERE IS
; NO NEED TO ADD CARRIER DETECT TO THIS ROUTINE. ╘HIS ROUTINE WILL ALSO
; HANDLE ALL STANDARD CONSOLE INTERRUPTS SUCH AS SYSOP-PAGE, ├= STATUS
; CHANGE, ETC IF YOU EXIT YOUR MODULE WHEN THIS ROUTINE RETURNS WITH CARRIER
; SET.
; ----------------------------------------------------------------------------
; ╟ETTING THE VALUE OF A STRING VARIABLE. (╒SED WHEN YOU WANT TO USE OR
; DISPLAY THE VALUE OF A ┬┴╙╔├ STRING VARIABLE SUCH AS THE DATE, USER'S NAME,
; ETC.)
ADRS = $0019 ; ╒SED TO STORE ADDRESS OF STRING DATA
VAR = $0021 ; ╒SED TO STORE ADDRESS OF VARIABLE DESCRIPTOR
LENGTH = $0023 ; ╒SED TO STORE LENGTH OF STRING DATA
╞╔╬─╓┴╥
PLA ; GET ADDRESS OF JSR INSTRUCTION USED TO CALL THIS
STA ADRS ; THIS SUBROUTINE (VARIABLE NAME IS STORED
PLA ; IMMEDIATELY AFTER THE JSR INSTRUCTION)
STA ADRS+1
INC ADRS
BNE ╞╓00
INC ADRS+1
╞╓00
LDA #$02 ; SET UP JMP INSTRUCTION AT END OF THIS SUBROUTINE
CLC ; TO JUMP BACK INTO THE CALLING ROUTINE JUST AFTER
ADC ADRS ; THE VARIABLE NAME
STA ╩╒═╨
LDA #$00
ADC ADRS+1
STA ╩╒═╨+1
LDA $2D ; FIND START OF VARIABLE STORAGE AREA
STA VAR
LDA $2E
STA VAR+1
╞╓01
LDY #$00 ; (VAR) POINTING TO DESIRED VARIABLE?
LDA (VAR),Y
CMP (ADRS),Y
BNE ╞╓02
INY
LDA (VAR),Y
EOR #$80
CMP (ADRS),Y
BEQ ╞╓03 ; JUMP IF VARIABLE FOUND
╞╓02
LDA #$07 ; OTHERWISE GO TO NEXT VARIABLE
CLC
ADC VAR
STA VAR
BCC ╞╓01
INC VAR+1
BNE ╞╓01
╞╓03
LDY #$02 ; VARIABLE FOUND (VAR POINTS TO VARIABLE NAME
LDA (VAR),Y ; IN VARIABLE TABLE
STA (LENGTH) ; STORE LENGTH
INY
LDA (VAR),Y
STA ADRS ; STORE ADDRESS
INY
LDA (VAR),Y
STA ADRS+1
JMP ; RETURN TO CALLING ROUTINE
╩╒═╨ $0000
; ╘HIS SUBROUTINE MUST BE CALLED WITH THE NAME OF THE VARIABLE STORED IN
; THE TWO BYTES FOLLOWING THE JSR STATEMENT. ╘HE VARIABLE NAME MUST START
; WITH A LOWERCASE LETTER, AND END WITH A LOWERCASE LETTER, A DIGIT, OR A
; SPACE. ╘HE VARIABLE MUST ALREADY EXIST, OTHERWISE THE ROUTINE WILL LOCKUP.
; ╒PON EXITING, "VAR" POINTS TO THE VARIABLE NAME IN THE VARIABLE TABLE,
; "LENGTH" CONTAINS THE NUMBER OF CHARACTERS IN THE STRING VARIABLE, AND
; "ADRS" POINTS TO THE FIRST CHARACTER OF THE STRING. ╥EGISTERS ┴ AND ┘ ARE
; MODIFIED.
; ╔F YOU WISH TO READ A NUMERIC VARIABLE, YOU MUST DEVISE YOUR OWN METHOD
; OF USING THE FLOATING POINT INFORMATION IN THE VARIABLE. ╧NCE YOU DEVISE
; A WAY TO ACCESS THE ┬┴╙╔├ ╥╧═, YOU CAN USE THE ╔NTEGER/╞LOATING ╨OINT
; CONVERSION ROUTINES AVAILABLE THROUGH VECTORS $3/$4 AND $5/$6.
; ┘OU CAN ALSO TRY SWITCHING IN ┬┴╙╔├ AT TIMES WHEN YOU NEED TO. ╩UST
; REMEMBER NOT TO SWITCH ┬┴╙╔├ IN WHILE YOU ARE STILL UNDER THE ┬┴╙╔├ ╥╧═.