99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0001 Version 2.0 (Weiand 1985) Options : LCSFPF [0001] [0002] *********************************************************** [0003] COPY 'DSK5.MYXB3-A' <0001> *********************************************************** <0002> TITL 'MYXB3' <0003> *********************************************************** <0004> GROM >6000 <0005> *********************************************************** <0006> TITL 'EQUATES EDIT-359' <0007> *********************************************************** <0008> A040 CPUBAS EQU >A040 CRU base <0009> *********************************************************** <0010> * GROM ADDRESSES <0011> 6038 MZMSG EQU >6038 Start of message area <0012> 6A70 MZPSCN EQU >6A70 Module PSCAN branch table add <0013> *********************************************************** <0014> 801A OUTREC EQU >801A <0015> 8024 G8024 EQU >8024 CHKEND in upper GROM is diffe <0016> CB00 KEYTAB EQU >CB00 <0017> CD77 ERRTAB EQU >CD77 <0018> CE1F TRACBK EQU >CE1F <0019> CF68 RETNOS EQU >CF68 <0020> D000 EDTZZ0 EQU >D000 Edit a line or display it tab <0021> D00D EDTZ00 EQU >D00D Edit a line or display it <0022> D0AF SAVLIN EQU >D0AF Save input line address <0023> E025 GE025 EQU >E025 RXB PATCH CODE FOR EA CART <0024> *********************************************************** <0025> * EQUATES FOR ROUTINES FROM OTHER SECTIONS <0026> <0027> 8012 CLSALL EQU >8012 CLose ALL open files <0028> 8014 SAVE EQU >8014 SAVE a program <0029> 8016 OLD EQU >8016 OLD (load a program) <0030> 8018 LIST EQU >8018 LIST a program <0031> 8026 OLD1 EQU >8026 A subprogram for LOAD <0032> 8028 MERGE EQU >8028 MERGE a program <0033> 802A GRMLST EQU >802A List program line from ERAM <0034> 802C GRSUB2 EQU >802C Read from ERAM(GREAD1) or VDP <0035> 802E GRSUB3 EQU >802E Read from ERAM(use GREAD1) or <0036> * VDP, reset prossible bkpt to <0037> <0038> 0032 ATNZZ EQU >0032 Arctangent routine <0039> <0040> 6A84 ERRZ EQU >6A84 ERRor routine <0041> <0042> A004 EXEC EQU >A004 <0043> A00A ASC EQU >A00A <0044> A00C EXEC1 EQU >A00C EXECute a program statememt <0045> A00E EXEC6D EQU >A00E <0046> A010 DELINK EQU >A010 <0047> A014 SQUISH EQU >A014 <0048> A018 INTRND EQU >A018 Initilize random number <0049> A026 LINK1 EQU >A026 LINK to subprogram <0050> *********************************************************** <0051> * Equates for routine in MONITOR <0052> 0010 CALDSR EQU >10 CALL DEVICE SERVICE ROUTINE <0053> 0034 TONE1 EQU >34 ACCEPT TONE <0054> 0036 TONE2 EQU >36 BAD TONE <0055> *********************************************************** <0056> * Equates for XMLs <0057> 0000 SYNCHK EQU >00 SYNCHK XML selector <0058> 0003 SEETWO EQU >03 SEETWO XML selector <0059> 0070 COMPCT EQU >70 PREFORM A GARBAGE COLLECTION <0060> 0072 MEMCHK EQU >72 MEMORY check routine: VDP <0061> 0077 VPUSH EQU >77 Push on value stack <0062> 0078 VPOP EQU >78 Pop off value stack 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0002 EQUATES EDIT-359 <0063> 0079 PGMCHR EQU >79 GET PROGRAM CHARACTER <0064> 007D SCHSYM EQU >7D Search symbol table <0065> 007E SPEED EQU >7E SPEED UP XML <0066> 007F CRUNCH EQU >7F Crunch an input line <0067> 0081 CONTIN EQU >81 Continue after a break <0068> 0083 SCROLL EQU >83 SCROLL THE SCREEN <0069> 0084 IO EQU >84 IO utility (KW table search) <0070> 0085 GREAD EQU >85 READ DATA FROM ERAM <0071> 0086 GWRITE EQU >86 WRITE DATA TO ERAM <0072> 0087 DELREP EQU >87 REMOVE CONTENT FROM VDP/ERAM <0073> 0088 MVDN EQU >88 MOVE DATA IN VDP/ERAM <0074> 0089 MVUP EQU >89 MOVE DATA IN VDP/ERAM <0075> 008A VGWITE EQU >8A MOVE DATA FROM VDP TO ERAM <0076> 008B GVWITE EQU >8B WRITE DATA FROM GRAM TO VRAM <0077> 008E GDTECT EQU >8E ERAM DETECT&ROM PAGE 1 ENABLE <0078> 008F SCNSMT EQU >8F SCAN STATEMENT FOR PRESCAN <0079> *********************************************************** <0080> * GPL Status Block <0081> 8372 STACK EQU >8372 STACK FOR DATA <0082> 8374 KEYBD EQU >8374 KEYBOARD SELCTION <0083> 8375 RKEY EQU >8375 KEY CODE <0084> 8378 RANDOM EQU >8378 RANDOM NUMBER GENERATOR <0085> 8379 TIMER EQU >8379 TIMING REGISTER <0086> 837A MOTION EQU >837A NUMBER OF MOVING SPRITES <0087> 837B VDPSTS EQU >837B VDP STATUS REGISTER <0088> 837C ERCODE EQU >837C STATUS REGISTER <0089> *********************************************************** <0090> * Temporary workspaces in EDIT <0091> 8300 VAR0 EQU >8300 TEMPORARY <0092> 8301 VARV EQU >8301 TEMPORARY <0093> 8302 ACCUM EQU >8302 # OF BYTES ACCUMULATOR (4 BYTE <0094> 8302 STPT EQU >8302 TWO BYTES <0095> 8304 VARY EQU >8304 <0096> 8306 VARY2 EQU >8306 <0097> 8304 PABPTR EQU >8304 <0098> 8306 DFLTLM EQU >8306 Default array limit (10) <0099> 8306 CCPPTR EQU >8306 OFFSET WITHIN RECORED (1) <0100> 8307 RECLEN EQU >8307 LENGTH OF CURRENT RECORD (1) <0101> 8308 CCPADR EQU >8308 RAM address of current refs <0102> 8308 VARC EQU >8308 <0103> 8308 CCPADD EQU >8308 RAM address of current color <0104> 830A CALIST EQU >830A Call list for resolving refs <0105> 830A RAMPTR EQU >830A Pointer for crunching <0106> 830C BYTES EQU >830C BYTE COUNTER <0107> 830C NMPTR EQU >830C Pointer save for pscan <0108> 830E CHSAV EQU >830E <0109> 830E CURINC EQU >830E Increment for auto-num mode <0110> 8310 TOPSTK EQU >8310 Top of data stack pointer <0111> 8312 LINUM EQU >8312 Used to determine end of scan <0112> 8314 NMLEN EQU >8314 Current line for auto-num <0113> 8314 CURLIN EQU >8314 Current line for auto-num <0114> 8316 VAR9 EQU >8316 <0115> 8316 XFLAG EQU >8316 SCAN FLAG-BITS USED AS BELOW <0116> 8317 DSRFLG EQU >8317 INTERNAL =60, EXTERNAL =0 (1) <0117> 8317 FORNET EQU >8317 Nesting level of for/next <0118> <0119> 8302 AAA1 EQU >8302 <0120> 830C BBB1 EQU >830C <0121> 8308 CCC1 EQU >8308 <0122> *********************************************************** <0123> * Permanent workspace variables <0124> 8318 STRSP EQU >8318 String space begining <0125> 831A STREND EQU >831A String space ending <0126> 831C SREF EQU >831C Temporary string pointer 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0003 EQUATES EDIT-359 <0127> 831E SMTSRT EQU >831E Start of current statement <0128> 8320 VARW EQU >8320 Screen address <0129> 8322 ERRCOD EQU >8322 Return error code from ALC <0130> 8324 STVSPT EQU >8324 Value-stack base <0131> 832A VARA EQU >832A Ending display location <0132> 832C PGMPTR EQU >832C Program text pointer <0133> 832E EXTRAM EQU >832E Line number table pointer <0134> 8330 STLN EQU >8330 Start of line number table <0135> 8332 ENLN EQU >8332 End of line number table <0136> 8334 DATA EQU >8334 Data pointer for READ <0137> 8336 LNBUF EQU >8336 Line table pointer for READ <0138> 8338 INTRIN EQU >8338 Add of intrinsic poly constant <0139> 833A SUBTAB EQU >833A Subprogram symbol table <0140> 833C IOSTRT EQU >833C PAB list/Start of I/O chain <0141> 833E SYMTAB EQU >833E Symbol table pointer <0142> 8340 FREPTR EQU >8340 Free space pointer <0143> 8342 CHAT EQU >8342 Current charater/token <0144> 8343 BASE EQU >8343 OPTION BASE value <0145> 8344 PRGFLG EQU >8344 Program/imperative flag <0146> 8345 FLAG EQU >8345 General 8-bit flag <0147> 8346 BUFLEV EQU >8346 Crunch-buffer destruction leve <0148> 8348 LSUBP EQU >8348 Last subprogram block on stack <0149> * FAC EQU >834A Floating-point ACcurmulator <0150> 834B FAC1 EQU FAC+1 <0151> 834C FAC2 EQU FAC+2 <0152> 834D FAC3 EQU FAC+3 <0153> 834E FAC4 EQU FAC+4 <0154> 834F FAC5 EQU FAC+5 <0155> 8350 FAC6 EQU FAC+6 <0156> 8351 FAC7 EQU FAC+7 <0157> 8352 FAC8 EQU FAC+8 <0158> 8353 FAC9 EQU FAC+9 <0159> 8354 FAC10 EQU FAC+10 <0160> 8356 FAC12 EQU FAC+12 <0161> 8357 FAC13 EQU FAC+13 <0162> 8358 FAC14 EQU FAC+14 <0163> 8359 FAC15 EQU FAC+15 <0164> 835A FAC16 EQU FAC+16 <0165> 835B FAC17 EQU FAC+17 <0166> 834C AAA EQU FAC+2 <0167> 834E CCC EQU FAC+4 <0168> 8350 BBB EQU FAC+6 <0169> 834C DDD EQU FAC+2 <0170> 834E FFF EQU FAC+4 <0171> 8350 EEE EQU FAC+6 <0172> 8354 DDD1 EQU FAC+10 <0173> 8356 FFF1 EQU FAC+12 <0174> 8358 EEE1 EQU FAC+14 <0175> * ARG EQU >835C Floating-point ARGument <0176> 835D ARG1 EQU ARG+1 <0177> 835E ARG2 EQU ARG+2 <0178> 835F ARG3 EQU ARG+3 <0179> 8360 ARG4 EQU ARG+4 <0180> 8361 ARG5 EQU ARG+5 <0181> 8362 ARG6 EQU ARG+6 <0182> 8363 ARG7 EQU ARG+7 <0183> 8364 ARG8 EQU ARG+8 <0184> 8364 XSTLN EQU >8364 GKXB variable <0185> 8366 XENLN EQU >8366 GKXB variable <0186> 8367 ARG11 EQU ARG+11 <0187> 8368 XCURLI EQU >8368 GKXB variable <0188> 836A XCURIN EQU >836A GKXB variable <0189> 836B ARG15 EQU ARG+15 <0190> 836C ARG16 EQU ARG+16 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0004 EQUATES EDIT-359 <0191> * VSPTR EQU >836E Value stack pointer <0192> 8376 EXPZ EQU >8376 Exponent in floating-point <0193> 8384 RAMTOP EQU >8384 Highest address in ERAM <0194> 8386 RAMFRE EQU >8386 Free pointer in the ERAM <0195> 8388 RSTK EQU >8388 Subroutine stack base <0196> 8389 RAMFLG EQU >8389 ERAM flag <0197> 83AF STKMIN EQU >83AF Base of data stack <0198> 83BD STKMAX EQU >83BD Top of data stack <0199> 83CE PRTNFN EQU >83CE <0200> *********************************************************** <0201> * VDP addresses <0202> 02E2 NLNADD EQU >02E2 New LiNe ADDress <0203> 02FE ENDSCR EQU >02FE END of SCReen address <0204> 0371 LODFLG EQU >0371 Auto-boot needed flag <0205> 0372 START EQU >0372 Line to start execution at <0206> 0376 SYMBOL EQU >0376 Saved symbol table pointer <0207> 0382 SPGMPT EQU >0382 Saved PGMPTR for continue <0208> 0384 SBUFLV EQU >0384 Saved BUFLEV for contiue <0209> 0386 SEXTRM EQU >0386 Saved EXTRAM for continue <0210> * SAVEVP EQU >0388 Saved VSPRT for continue <0211> * ERRLN EQU >038A On-error line pointer <0212> 038C BUFSRT EQU >038C Edit recall start addr (VARW) <0213> 038E BUFEND EQU >038E Edit recall end addr (VARA) <0214> 0392 TABSAV EQU >0392 Saved main symbol table ponte <0215> 0396 SLSUBP EQU >0396 Saved LSUBP for continue <0216> 0398 SFLAG EQU >0398 Saved on-warning/break bits <0217> 039A SSTEMP EQU >039A To save subprogram program ta <0218> 039C SSTMP2 EQU >039C Same as above. Used in SUBPRO <0219> 039E MRGPAB EQU >039E MERGEd temporary for pab ptr <0220> *---------------------------------------------------------- <0221> * Added 6/8/81 for NOPSCAN feature <0222> 03B7 PSCFG EQU >03B7 <0223> *---------------------------------------------------------- <0224> * Flag 0: 99/4 console, 5/29/81 <0225> * 1: 99/4A console <0226> 03BB CONFLG EQU >03BB <0227> *---------------------------------------------------------- <0228> * Temporary <0229> 0374 NOTONE EQU >0374 NO-TONE for SIZE in ACCEPT us <0230> * in FLMGRS (4 bytes used) <0231> 0388 SAVEVP EQU >0388 <0232> 038A ERRLN EQU >038A <0233> 03AC ACCVRW EQU >03AC Temoporary used in ERRZZ, als <0234> * used in FLMGRS <0235> 03B0 VALIDP EQU >03B0 Use as two values passing fro <0236> 03B2 VALIDL EQU >03B2 VALIDATE code to READL1 <0237> 03BC OLDTOP EQU >03BC Temporary used in ERRZZ, also <0238> <0239> 0820 CRNBUF EQU >0820 CRuNch BUFfer address <0240> 08BE CRNEND EQU >08BE CRuNch buffer END <0241> 08C0 RECBUF EQU >08C0 Edit RECall BUFfer <0242> 0958 VRAMVS EQU >0958 Default base of value stack <0243> 0390 CNSTMP EQU >0390 Use as temporary stored place <0244> *********************************************************** <0245> * IMMEDITATE VALUES <0246> 0000 NUMBR EQU >00 NUMERIC validate <0247> 0002 LISTZ EQU >02 <0248> 0005 OLDZ EQU >05 <0249> 0006 RESEQZ EQU >06 <0250> 0007 SAVEZ EQU >07 <0251> 0008 MERGEZ EQU >08 <0252> 000A DWNARR EQU >0A <0253> 000B UPARR EQU >0B <0254> 000D CHRTN EQU >0D 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0005 EQUATES EDIT-359 <0255> 0060 OFFSET EQU >60 <0256> 0080 OSPACE EQU >20+OFFSET GKXB space plus offset <0257> * Bits in XFLAG <0258> 0000 REMODE EQU 0 REM only mode <0259> 0001 OPTFLG EQU 1 Option base declared flag <0260> 0002 FNCFLG EQU 2 Scanning UDF <0261> 0003 SUBFLG EQU 3 Scanning a subprogram <0262> 0004 STRFLG EQU 4 Scanning a string variable <0263> 0005 SAFLG EQU 5 Scanning subprogram arguments <0264> 0006 IFFLAG EQU 6 Scanning an if-statement <0265> 0007 ENTXFL EQU 7 ENTERX flag <0266> * <0267> * BITS IN FLAG <0268> * NUMBIT EQU >00 Autonum bit (Can't use MACRO) <0269> 0001 WRNPRT EQU 1 Warning print bit <0270> 0002 WRNSTP EQU 2 Warning stop bit <0271> *********************************************************** <0272> * Editting command equates <0273> 0002 BREAK EQU >02 Break key <0274> 0003 DLETE EQU >03 Delete key <0275> 0004 INSRT EQU >04 Insert key <0276> 0006 RECALL EQU >06 Edit-buffer recall <0277> 0007 CLRLN EQU >07 Clear-line key <0278> 0008 BACK EQU >08 Back-space key <0279> 0009 FORW EQU >09 Forward-space key <0280> 000A DOWN EQU >0A Down-arrow key <0281> 000B UPMV EQU >0B Up-arrow key <0282> *********************************************************** <0283> * IMMEDITE VALUES <0284> 0022 QUOTE EQU >22 " <0285> 0024 DOLLAR EQU >24 $ <0286> 007E CURSOR EQU >1E+OFFSET CURSOR <0287> 007F EDGECH EQU >1F+OFFSET EDGE character <0288> 002C COMMA EQU >2C , <0289> 002D DASH EQU >2D - GKXB <0290> 003A COLON EQU >3A : GKXB <0291> *********************************************************** <0292> * PAB offset <0293> 0001 CZCLOS EQU 1 CLOSE CODE <0294> 0004 COD EQU 4 I/O code <0295> 000D NLEN EQU 13 Length of file descriptor <0296> *********************************************************** <0297> * BASIC TOKEN TABLE <0298> * EQU >80 spare token <0299> 0081 ELSEZ EQU >81 ELSE <0300> 0082 SSEPZ EQU >82 :: <0301> 0083 TREMZ EQU >83 $ <0302> 0084 IFZ EQU >84 IF <0303> 0085 GOZ EQU >85 GO <0304> 0086 GOTOZ EQU >86 GOTO <0305> 0087 GOSUBZ EQU >87 GOSUB <0306> 0088 RETURZ EQU >88 RETURN <0307> 0089 DEFZ EQU >89 DEF <0308> 008A DIMZ EQU >8A DIM <0309> 008B ENDZ EQU >8B END <0310> 008C FORZ EQU >8C FOR <0311> 008D LETZ EQU >8D LET <0312> 008E BREAKZ EQU >8E BREAK <0313> 008F UNBREZ EQU >8F UNBREAK <0314> 0090 TRACEZ EQU >90 TRACE <0315> 0091 UNTRAZ EQU >91 UNTRACE <0316> 0092 INPUTZ EQU >92 INPUT <0317> 0093 DATAZ EQU >93 DATA <0318> 0094 RESTOZ EQU >94 RESTORE 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0006 EQUATES EDIT-359 <0319> 0095 RANDOZ EQU >95 RANDOMIZE <0320> 0096 NEXTZ EQU >96 NEXT <0321> 0097 READZ EQU >97 READ <0322> 0098 STOPZ EQU >98 STOP <0323> 0099 DELETZ EQU >99 DELETE <0324> 009A REMZ EQU >9A REM <0325> 009B ONZ EQU >9B ON <0326> 009C PRINTZ EQU >9C PRINT <0327> 009D CALLZ EQU >9D CALL <0328> 009E OPTIOZ EQU >9E OPTION <0329> 009F OPENZ EQU >9F OPEN <0330> 00A0 CLOSEZ EQU >A0 CLOSE <0331> 00A1 SUBZ EQU >A1 SUB <0332> 00A2 DISPLZ EQU >A2 DISPLAY <0333> 00A3 IMAGEZ EQU >A3 IMAGE <0334> 00A4 ACCEPZ EQU >A4 ACCEPT <0335> 00A5 ERRORZ EQU >A5 ERROR <0336> 00A6 WARNZ EQU >A6 WARNING <0337> 00A7 SUBXTZ EQU >A7 SUBEXIT <0338> 00A8 SUBNDZ EQU >A8 SUBEND <0339> 00A9 RUNZ EQU >A9 RUN <0340> 00AA LINPUZ EQU >AA LINPUT <0341> * EQU >AB Zpare token (LIBRARY) <0342> * EQU >AC Zpare token (REAL) <0343> * EQU >AD Zpare token (INTEGER) <0344> * EQU >AE Zpare token (SCRATCH) <0345> * EQU >AF Zpare token <0346> 00B0 THENZ EQU >B0 THEN <0347> 00B1 TOZ EQU >B1 TO <0348> 00B2 STEPZ EQU >B2 STEP <0349> 00B3 COMMAZ EQU >B3 , <0350> 00B4 SEMICZ EQU >B4 ; <0351> 00B5 COLONZ EQU >B5 : <0352> 00B6 RPARZ EQU >B6 ) <0353> 00B7 LPARZ EQU >B7 ( <0354> 00B8 CONCZ EQU >B8 & (CONCATENATE) <0355> * EQU >B9 spare token <0356> 00BA ORZ EQU >BA OR <0357> 00BB ANDZ EQU >BB AND <0358> 00BC XORZ EQU >BC XOR <0359> 00BD NOTZ EQU >BD NOT <0360> 00BE EQUALZ EQU >BE = <0361> 00BF LESSZ EQU >BF < <0362> 00C0 GREATZ EQU >C0 > <0363> 00C1 PLUSZ EQU >C1 + <0364> 00C2 MINUSZ EQU >C2 - <0365> 00C3 MULTZ EQU >C3 * <0366> 00C4 DIVIZ EQU >C4 / <0367> 00C5 CIRCUZ EQU >C5 ^ <0368> * EQU >C6 spare token <0369> 00C7 STRINZ EQU >C7 QUOTED STRING <0370> 00C8 UNQSTZ EQU >C8 UNQUOTED STRING <0371> 00C8 NUMZ EQU >C8 ALSO NUMERICAL STRING <0372> 00C8 NUMCOZ EQU >C8 ALSO UNQUOTED STRING <0373> 00C9 LNZ EQU >C9 LINE NUMBER CONSTANT <0374> * EQU >CA spare token <0375> 00CB ABSZ EQU >CB ABS <0376> 00CC ATNZ EQU >CC ATN <0377> 00CD COSZ EQU >CD COS <0378> 00CE EXPZZ EQU >CE EXP <0379> 00CF INTZ EQU >CF INT <0380> 00D0 LOGZ EQU >D0 LOG <0381> 00D1 SGNZZ EQU >D1 SGN <0382> 00D2 SINZ EQU >D2 SIN 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0007 EQUATES EDIT-359 <0383> 00D3 SQRZ EQU >D3 SQR <0384> 00D4 TANZ EQU >D4 TAN <0385> 00D5 LENZ EQU >D5 LEN <0386> 00D6 CHRZZ EQU >D6 CHR$ <0387> 00D7 RNDZ EQU >D7 RND <0388> 00D8 SEGZZ EQU >D8 SEG$ <0389> 00D9 POSZ EQU >D9 POS <0390> 00DA VAL EQU >DA VAL <0391> 00DB STRZZ EQU >DB STR$ <0392> 00DC ASCZ EQU >DC ASC <0393> 00DD PIZ EQU >DD PI <0394> 00DE RECZ EQU >DE REC <0395> 00DF MAXZ EQU >DF MAX <0396> 00E0 MINZ EQU >E0 MIN <0397> 00E1 RPTZZ EQU >E1 RPT$ <0398> <0399> * EQU >E2 to >E7 <0400> <0401> 00E8 NUMERZ EQU >E8 NUMERIC <0402> 00E9 DIGITZ EQU >E9 DIGIT <0403> 00EA UALPHZ EQU >EA UALPHA <0404> 00EB SIZEZ EQU >EB SIZE <0405> 00EC ALLZ EQU >EC ALL <0406> 00ED USINGZ EQU >ED USING <0407> 00EE BEEPZ EQU >EE BEEP <0408> 00EF ERASEZ EQU >EF ERASE <0409> 00F0 ATZ EQU >F0 AT <0410> 00F1 BASEZ EQU >F1 BASE <0411> * EQU >F2 spare token (TEMPORARY) <0412> * EQU >F3 spare token (VARIABLE) <0413> * EQU >F4 spare token (RELATIVE) <0414> * EQU >F5 spare token (INTERNAL) <0415> 00F6 SEQUEZ EQU >F6 SEQUENTIAL <0416> 00F7 OUTPUZ EQU >F7 OUTPUT <0417> 00F8 UPDATZ EQU >F8 UPDATE <0418> 00F9 APPENZ EQU >F9 APPEND <0419> 00FA FIXEDZ EQU >FA FIXED <0420> 00FB PERMAZ EQU >FB PERMANENT <0421> 00FC TABZ EQU >FC TAB <0422> 00FD NUMBEZ EQU >FD # <0423> 00FE VALIDZ EQU >FE VALIDATE <0424> * EQU >FF ILLEGAL VALUE [0004] *********************************************************** [0005] COPY 'DSK5.MYXB3-B' <0001> *********************************************************** <0002> TITL 'EDIT-359' <0003> *********************************************************** <0004> * GROM HEADER <0005> *********************************************************** <0006> GROM >6000 <0007> AORG 0 <0008> 6000 AA,02,01 DATA >AA02,>0100,0,USER,0,LINK1,0,0 6003 00,00,00 6006 63,3B,00 6009 00,A0,26 600C 00,00,00 600F 00 <0009> *********************************************************** <0010> * Branch table for routines in EDIT <0011> *********************************************************** <0012> 6010 45,71 BR AUTON <0013> 6012 43,DD G6012 BR TOPL15 <0014> 6014 48,C3 BR INITPG <0015> 6016 49,5A BR SPRINT Initialize sprites. 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0008 EDIT-359 <0016> 6018 5D,C5 BR CHRTBL RXB CHRTBL <0017> 601A 43,DA BR TOPL10 <0018> 601C 49,25 G601C BR CHRTAB <0019> 601E 44,9B BR SZRUN <0020> 6020 40,20 BR $ Was GETLNB <0021> 6022 48,DC BR KILSYM <0022> 6024 40,24 BR $ Was CRUNCH <0023> 6026 48,45 BR GETNB <0024> 6028 48,4A BR GETNB2 <0025> 602A 48,50 BR GETCHR <0026> 602C 48,6A BR GETLN <0027> 602E 45,7C BR AUTO1 <0028> 6030 63,D3 DATA TOPL02 <0029> 6032 46,CF BR EDITLN <0030> 6034 48,10 BR GRSUB1 Read from ERAM (use GREAD/VDP <0031> 6036 48,28 BR GWSUB Write a few bytes to ERAM/VDP <0032> * Error and system messages <0033> * BASE 0,0,>300,>300,0,0,>60 <0034> 6038 A9,CE,80 MSGERR BYTE >A9,>CE,>80,>A5,>D2,>D2,>CF,>D2 603B A5,D2,D2 603E CF,D2 <0035> * In Error <0036> 6040 07,B2,C5 MSGFST BYTE >07,>B2,>C5,>C1,>C4,>D9,>80,>8A 6043 C1,C4,D9 6046 80,8A <0037> * Ready <0038> 6048 0A,A2,D2 MSGBRK BYTE >0A,>A2,>D2,>C5,>C1,>CB,>D0,>CF,>C9,>CE,>D4 604B C5,C1,CB 604E D0,CF,C9 6051 CE,D4 <0039> * Breakpoint <0040> 6053 B4,D2,D9 MSGTA BYTE >B4,>D2,>D9,>80,>A1,>C7,>C1,>C9,>CE 6056 80,A1,C7 6059 C1,C9,CE <0041> * Try Again <0042> 605C 8A,80,B7 MSGWRN BYTE >8A,>80,>B7,>C1,>D2,>CE,>C9,>CE,>C7 605F C1,D2,CE 6062 C9,CE,C7 <0043> * * Warning <0044> 6065 10,AE,D5 MSG10 BYTE >10,>AE,>D5,>CD,>C5,>D2,>C9,>C3,>80 6068 CD,C5,D2 606B C9,C3,80 <0045> * Numeric <0046> 606E AF,D6,C5 BYTE >AF,>D6,>C5,>D2,>C6,>CC,>CF,>D7 6071 D2,C6,CC 6074 CF,D7 <0047> * Overflow <0048> 6076 0C,B3,D9 MSG14 BYTE >0C,>B3,>D9,>CE,>D4,>C1,>D8,>80,>A5,>D2,>D2,>CF 6079 CE,D4,C1 607C D8,80,A5 607F D2,D2,CF 6082 D2 <0049> * Syntax Error <0050> 6083 18,A9,CC MSG16 BYTE >18,>A9,>CC,>CC,>C5,>C7,>C1,>CC,>80,>A1,>C6,>D4 6086 CC,C5,C7 6089 C1,CC,80 608C A1,C6,D4 608F C5,D2,80 <0051> * Illegal After <0052> 6092 B3,D5,C2 BYTE >B3,>D5,>C2,>D0,>D2,>CF,>C7,>D2,>C1,>CD 6095 D0,D2,CF 6098 C7,D2,C1 609B CD <0053> * Subprogram 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0009 EDIT-359 <0054> 609C 10,B5,CE MSG17 BYTE >10,>B5,>CE,>CD,>C1,>D4,>C3,>C8,>C5,>C4,>80 609F CD,C1,D4 60A2 C3,C8,C5 60A5 C4,80 <0055> * Unmatched <0056> 60A7 B1,D5,CF BYTE >B1,>D5,>CF,>D4,>C5,>D3 60AA D4,C5,D3 <0057> * Quotes <0058> 60AD 0D,AE,C1 MSG19 BYTE >0D,>AE,>C1,>CD,>C5,>80,>B4,>CF,>CF,>80,>AC,>CF 60B0 CD,C5,80 60B3 B4,CF,CF 60B6 80,AC,CF 60B9 CE,C7 <0059> * Name Too Long <0060> 60BB 16,B3,D4 MSG24 BYTE >16,>B3,>D4,>D2,>C9,>CE,>C7,>8D,>AE,>D5,>CD,>C2 60BE D2,C9,CE 60C1 C7,8D,AE 60C4 D5,CD,C2 60C7 C5,D2,80 <0061> * String-Number <0062> 60CA AD,C9,D3 BYTE >AD,>C9,>D3,>CD,>C1,>D4,>C3,>C8 60CD CD,C1,D4 60D0 C3,C8 <0063> * Mismatch <0064> 60D2 11,AF,D0 MSG25 BYTE >11,>AF,>D0,>D4,>C9,>CF,>CE,>80,>A2,>C1,>D3,>C5 60D5 D4,C9,CF 60D8 CE,80,A2 60DB C1,D3,C5 60DE 80 <0065> * Option Base <0066> 60DF A5,D2,D2 BYTE >A5,>D2,>D2,>CF,>D2 60E2 CF,D2 <0067> * Error <0068> 60E4 14,A9,CD MSG28 BYTE >14,>A9,>CD,>D0,>D2,>CF,>D0,>C5,>D2,>CC,>D9,>80 60E7 D0,D2,CF 60EA D0,C5,D2 60ED CC,D9,80 <0069> * Improperly <0070> 60F0 B5,D3,C5 BYTE >B5,>D3,>C5,>C4,>80,>AE,>C1,>CD,>C5 60F3 C4,80,AE 60F6 C1,CD,C5 <0071> * Used Name <0072> 60F9 16,B5,CE MSG34 BYTE >16,>B5,>CE,>D2,>C5,>C3,>CF,>C7,>CE,>C9,>DA,>C5 60FC D2,C5,C3 60FF CF,C7,CE 6102 C9,DA,C5 6105 C4,80 <0073> * Unrecognized <0074> 6107 A3,C8,C1 BYTE >A3,>C8,>C1,>D2,>C1,>C3,>D4,>C5,>D2 610A D2,C1,C3 610D D4,C5,D2 <0075> * Character <0076> 6110 0B,A9,CD MSG36 BYTE >0B,>A9,>CD,>C1,>C7,>C5,>80,>A5,>D2,>D2,>CF,>D2 6113 C1,C7,C5 6116 80,A5,D2 6119 D2,CF,D2 <0077> * Image Error <0078> 611C 0B,AD,C5 MSG39 BYTE >0B,>AD,>C5,>CD,>CF,>D2,>D9,>80,>A6,>D5,>CC,>CC 611F CD,CF,D2 6122 D9,80,A6 6125 D5,CC,CC <0079> * Memory Full <0080> 6128 0E,B3,D4 MSG40 BYTE >0E,>B3,>D4,>C1,>C3,>CB,>80,>AF,>D6,>C5,>D2,>C6 612B C1,C3,CB 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0010 EDIT-359 612E 80,AF,D6 6131 C5,D2,C6 6134 CC,CF,D7 <0081> * Stack Overflow <0082> 6137 10,AE,A5 MSG43 BYTE >10,>AE,>A5,>B8,>B4,>80,>B7,>C9,>D4,>C8,>CF,>D5 613A B8,B4,80 613D B7,C9,D4 6140 C8,CF,D5 6143 D4,80 <0083> * NEXT Without <0084> 6145 A6,AF,B2 BYTE >A6,>AF,>B2 <0085> * FOR <0086> 6148 10,A6,AF MSG44 BYTE >10,>A6,>AF,>B2,>8D,>AE,>A5,>B8,>B4,>80 614B B2,8D,AE 614E A5,B8,B4 6151 80 <0087> * FOR-NEXT <0088> 6152 AE,C5,D3 BYTE >AE,>C5,>D3,>D4,>C9,>CE,>C7 6155 D4,C9,CE 6158 C7 <0089> * Nesting <0090> 6159 15,AD,D5 MSG47 BYTE >15,>AD,>D5,>D3,>D4,>80,>A2,>C5,>80,>A9,>CE 615C D3,D4,80 615F A2,C5,80 6162 A9,CE <0091> * Must be in <0092> 6164 80,B3,D5 BYTE >80,>B3,>D5,>C2,>D0,>D2,>CF,>C7,>D2,>C1,>CD 6167 C2,D0,D2 616A CF,C7,D2 616D C1,CD <0093> * Subprogram <0094> 616F 19,B2,C5 MSG48 BYTE >19,>B2,>C5,>C3,>D5,>D2,>D3,>C9,>D6,>C5,>80 6172 C3,D5,D2 6175 D3,C9,D6 6178 C5,80 <0095> * Recursive <0096> 617A B3,D5,C2 BYTE >B3,>D5,>C2,>D0,>D2,>CF,>C7,>D2,>C1,>CD,>80,>A3 617D D0,D2,CF 6180 C7,D2,C1 6183 CD,80,A3 6186 C1,CC,CC <0097> * Subprogram Call <0098> 6189 0E,AD,C9 MSG49 BYTE >0E,>AD,>C9,>D3,>D3,>C9,>CE,>C7,>80,>B3,>B5,>A2 618C D3,D3,C9 618F CE,C7,80 6192 B3,B5,A2 6195 A5,AE,A4 <0099> * Missing Subend <0100> 6198 14,B2,A5 MSG51 BYTE >14,>B2,>A5,>B4,>B5,>B2,>AE,>80,>B7,>C9,>D4,>C8 619B B4,B5,B2 619E AE,80,B7 61A1 C9,D4,C8 61A4 CF,D5,D4 <0101> * RETURN Without <0102> 61A7 80,A7,AF BYTE >80,>A7,>AF,>B3,>B5,>A2 61AA B3,B5,A2 <0103> * GOSUB <0104> 61AD 10,B3,D4 MSG54 BYTE >10,>B3,>D4,>D2,>C9,>CE,>C7,>80 61B0 D2,C9,CE 61B3 C7,80 <0105> * String <0106> 61B5 B4,D2,D5 BYTE >B4,>D2,>D5,>CE,>C3,>C1,>D4,>C5,>C4 61B8 CE,C3,C1 61BB D4,C5,C4 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0011 EDIT-359 <0107> * Truncated <0108> 61BE 0D,A2,C1 MSG57 BYTE >0D,>A2,>C1,>C4,>80,>B3,>D5,>C2,>D3,>C3,>D2,>C9 61C1 C4,80,B3 61C4 D5,C2,D3 61C7 C3,D2,C9 61CA D0,D4 <0109> * Bad Subscript <0110> 61CC 0E,AC,C9 MSG60 BYTE >0E,>AC,>C9,>CE,>C5,>80,>AE,>CF,>D4,>80,>A6,>CF 61CF CE,C5,80 61D2 AE,CF,D4 61D5 80,A6,CF 61D8 D5,CE,C4 <0111> * Line Not Found <0112> 61DB 0F,A2,C1 MSG61 BYTE >0F,>A2,>C1,>C4,>80,>AC,>C9,>CE,>C5,>80 61DE C4,80,AC 61E1 C9,CE,C5 61E4 80 <0113> * Bad Line <0114> 61E5 AE,D5,CD BYTE >AE,>D5,>CD,>C2,>C5,>D2 61E8 C2,C5,D2 <0115> * Number <0116> 61EB 0E,A3,C1 MSG67 BYTE >0E,>A3,>C1,>CE,>87,>D4,>80,>A3,>CF,>CE,>D4,>C9 61EE CE,87,D4 61F1 80,A3,CF 61F4 CE,D4,C9 61F7 CE,D5,C5 <0117> * Can't Continue <0118> 61FA 1A,A3,CF MSG69 BYTE >1A,>A3,>CF,>CD,>CD,>C1,>CE,>C4,>80 61FD CD,CD,C1 6200 CE,C4,80 <0119> * Command <0120> 6203 A9,CC,CC BYTE >A9,>CC,>CC,>C5,>C7,>C1,>CC,>80,>C9,>CE,>80 6206 C5,C7,C1 6209 CC,80,C9 620C CE,80 <0121> * Illegal in <0122> 620E B0,D2,CF BYTE >B0,>D2,>CF,>C7,>D2,>C1,>CD 6211 C7,D2,C1 6214 CD <0123> * Program <0124> 6215 17,AF,CE MSG70 BYTE >17,>AF,>CE,>CC,>D9,>80,>AC,>C5,>C7,>C1,>CC,>80 6218 CC,D9,80 621B AC,C5,C7 621E C1,CC,80 <0125> * Only Legal <0126> 6221 C9,CE,80 BYTE >C9,>CE,>80 >C1,>80,>B0,>D2,>CF,>C7,>D2,>C1,>CD 6224 C1,80,B0 6227 D2,CF,C7 622A D2,C1,CD <0127> * in a Program <0128> 622D 0C,A2,C1 MSG74 BYTE >0C,>A2,>C1,>C4,>80,>A1,>D2,>C7,>D5,>CD,>C5,>CE 6230 C4,80,A1 6233 D2,C7,D5 6236 CD,C5,CE 6239 D4 <0129> * Bad Argument <0130> 623A 12,AE,CF MSG78 BYTE >12,>AE,>CF,>80,>B0,>D2,>CF,>C7,>D2,>C1,>CD 623D 80,B0,D2 6240 CF,C7,D2 6243 C1,CD <0131> * No Program <0132> 6245 80,B0,D2 BYTE >80,>B0,>D2,>C5,>D3,>C5,>CE,>D4 6248 C5,D3,C5 624B CE,D4 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0012 EDIT-359 <0133> * Present <0134> 624D 09,A2,C1 MSG79 BYTE >09,>A2,>C1,>C4,>80,>B6,>C1,>CC,>D5,>C5 6250 C4,80,B6 6253 C1,CC,D5 6256 C5 <0135> * Bad Value <0136> 6257 17,A9,D1 MSG81 BYTE >17,>A9,>D1,>C3,>C3,>D2,>D2,>C5,>C3,>D4,>80 625A C3,C3,D2 625D D2,C5,C3 6260 D4,80 <0137> * Incorrect <0138> 6262 A1,D2,C7 BYTE >A1,>D2,>C7,>D5,>CD,>C5,>CE,>D4,>80,>AC,>C9,>D3 6265 D5,CD,C5 6268 CE,D4,80 626B AC,C9,D3 626E D4 <0139> * Argument List <0140> 626F 0B,A9,CE MSG83 BYTE >0B,>A9,>CE,>D0,>D5,>D4,>80,>A5,>D2,>D2,>CF,>D2 6272 D0,D5,D4 6275 80,A5,D2 6278 D2,CF,D2 <0141> * Input Error <0142> 627B 0A,A4,C1 MSG84 BYTE >0A,>A4,>C1,>D4,>C1,>80,>A5,>D2,>D2,>CF,>D2 627E D4,C1,80 6281 A5,D2,D2 6284 CF,D2 <0143> * Data Error <0144> 6286 14,B0,D2 MSG97 BYTE >14,>B0,>D2,>CF,>D4,>C5,>C3,>D4,>C9,>CF,>CE,>80 6289 CF,D4,C5 628C C3,D4,C9 628F CF,CE,80 <0145> * Protection <0146> 6292 B6,C9,CF BYTE >B6,>C9,>CF,>CC,>C1,>D4,>C9,>CF,>CE 6295 CC,C1,D4 6298 C9,CF,CE <0147> * Violation <0148> 629B 0A,A6,C9 MSG109 BYTE >0A,>A6,>C9,>CC,>C5,>80,>A5,>D2,>D2,>CF,>D2 629E CC,C5,80 62A1 A5,D2,D2 62A4 CF,D2 <0149> * File Error <0150> 62A6 09,A9,8F MSG130 BYTE >09,>A9,>8F,>AF,>80,>A5,>D2,>D2,>CF,>D2 62A9 AF,80,A5 62AC D2,D2,CF 62AF D2 <0151> * I/O Error <0152> 62B0 14,B3,D5 MSG135 BYTE >14,>B3,>D5,>C2,>D0,>D2,>CF,>C7,>D2,>C1,>CD,>80 62B3 C2,D0,D2 62B6 CF,C7,D2 62B9 C1,CD,80 <0153> * Subprogram <0154> 62BC AE,CF,D4 BYTE >AE,>CF,>D4,>80,>A6,>CF,>D5,>CE,>C4 62BF 80,A6,CF 62C2 D5,CE,C4 <0155> * Not Found <0156> 62C5 0D,AC,C9 MSG62 BYTE >0D,>AC,>C9,>CE,>C5,>80,>B4,>CF,>CF,>80,>AC,>CF 62C8 CE,C5,80 62CB B4,CF,CF 62CE 80,AC,CF 62D1 CE,C7 <0157> * Line Too Long <0158> 62D3 A2,D9,D4 MSGFRE BYTE >A2,>D9,>D4,>C5,>D3,>80,>A6,>D2,>C5,>C5 62D6 C5,D3,80 62D9 A6,D2,C5 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0013 EDIT-359 62DC C5 <0159> * Bytes Free <0160> 62DD A2,D9,D4 MSGSFR BYTE >A2,>D9,>D4,>C5,>D3,>80,>CF,>C6,>80,>B3,>D4,>C1 62E0 C5,D3,80 62E3 CF,C6,80 62E6 B3,D4,C1 62E9 C3,CB,80 <0161> * Bytes of Stack <0162> 62EC A6,D2,C5 BYTE >A6,>D2,>C5,>C5 62EF C5 <0163> * Free <0164> 62F0 A2,D9,D4 MSGGFR BYTE >A2,>D9,>D4,>C5,>D3,>80,>CF,>C6,>80,>B0,>D2,>CF 62F3 C5,D3,80 62F6 CF,C6,80 62F9 B0,D2,CF 62FC C7,D2,C1 <0165> * Bytes of Program <0166> 62FF CD BYTE >CD <0167> 6300 B3,D0,C1 MSGGF1 BYTE >B3,>D0,>C1,>C3,>C5,>80,>A6,>D2,>C5,>C5 6303 C3,C5,80 6306 A6,D2,C5 6309 C5 <0168> * Space Free <0169> 630A B5,A4,A6 MSGCIS BYTE >B5,>A4,>A6,>80,>B2,>C5,>C6,>D3,>80,>A9,>D4,>D3 630D 80,B2,C5 6310 C6,D3,80 6313 A9,D4,D3 6316 C5,CC,C6 <0170> * UDF Refs Itself <0171> 6319 A3,C1,CC MSGCF BYTE >A3,>C1,>CC,>CC,>C5,>C4,>80,>A6,>D2,>CF,>CD 631C CC,C5,C4 631F 80,A6,D2 6322 CF,CD <0172> * Called From <0173> 6324 16,B3,D0 MSG56 BYTE >16,>B3,>D0,>C5,>C5,>C3,>C8,>80,>B3,>D4,>D2,>C9 6327 C5,C5,C3 632A C8,80,B3 632D D4,D2,C9 6330 CE,C7,80 <0174> * Speech String <0175> 6333 B4,CF,CF BYTE >B4,>CF,>CF,>80,>AC,>CF,>CE,>C7 6336 80,AC,CF 6339 CE,C7 <0176> * Too Long <0177> * BASE 0,0,>0300,>0300,0,0,0 <0178> 633B 00,00,63 USER DATA 0,TOPLEV 633E 72 <0179> 633F 11 BYTE 17 <0180> 6340 52,58,42 TEXT 'RXB VERSION 2001 ' 6343 20,56,45 6346 52,53,49 6349 4F,4E,20 634C 32,30,30 634F 31,20 <0181> 6351 09 DSCLOD BYTE 9 <0182> 6352 44,53,4B TEXT 'DSK1.LOAD' 6355 31,2E,4C 6358 4F,41,44 <0183> 635B 00 BYTE 0 <0184> 635C 81,00,00 SPCCHR BYTE >81,>00,>00,>00,>00,>00,>81,>00 * CURSOR CH 635F 00,00,00 6362 81,00 <0185> 6364 00,00,00 DATA 0,0,0,0 * EDGE CHAR 6367 00,00,00 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0014 EDIT-359 636A 00,00 <0186> 636C E0,00,20 VDPREG BYTE >E0,>00,>20,>00,>06,>00 636F 00,06,00 <0187> *********************************************************** <0188> * START OF BASIC INTERPETER <0189> *********************************************************** <0190> 6372 86,A3,70 TOPLEV CLR V@>0370 Initialize temp area <0191> 6375 35,00,4D MOVE 77,V@>0370,V@>0371 6378 A3,71,A3 637B 70 <0192> * RXB MODULE PATCH CODE FOR RXB MODULE ******************** <0193> * ST 5,@KEYBD Select full keyboard <0194> * SCAN <0195> * CZ @KEYBD <0196> * BR G6388 99/4A Console? <0197> 637C 06,7E,5C CALL CART * RXB PATCH CODE FOR CARTRIDE <0198> 637F BE,A3,BB ST >01,V@CONFLG Select 99/4A console 6382 01 <0199> 6383 86,74 G6388 CLR @KEYBD <0200> * RXB MODULE PATCH CODE FOR RXB MODULE ******************** <0201> * DST NLNADD,V@BUFSRT Initialize edit-buffer start <0202> * DST NLNADD,V@BUFEND Initialize edit-buffer end <0203> 6385 31,00,02 MOVE 2,G@ATNZZ,@INTRIN Get address of ATNZZ 6388 38,00,32 <0204> 638B B2,38,1F AND >1F,@INTRIN Throw away the BR opcode <0205> 638E A3,38,00 DADD >5B,@INTRIN Address of polynomial constan 6391 5B <0206> * RXB PATCH CODE ************* <0207> 6392 BE,A3,71 ST >31,V@LODFLG indicate try auto-boot 6395 31 <0208> 6396 43,A5 BR SZNEW <0209> <0210> AORG >03A5 <0211> *---------------------------------------------------------- <0212> * Add the following line for fixing "MEMORY FULL" error <0213> * occurring during MERGE execution will leave the file open <0214> * to disk DSR bug, 5/19/81 <0215> 63A5 86,A3,9E SZNEW CLR V@MRGPAB Initialize merged temporary * Warning - Address not even in 0215 <0216> * for PAB pointer <0217> *---------------------------------------------------------- <0218> 63A8 BE,73,88 ST RSTK,@SUBSTK Load base of subroutine stack <0219> 63AB 06,69,17 CALL CHRTA2 Load character table <0220> 63AE 86,45 CLR @FLAG Initialize flag byte <0221> 63B0 87,46 DCLR @BUFLEV Initialize crunch buffer leve <0222> 63B2 06,80,12 CALL CLSALL Close all open files <0223> 63B5 86,34 CLR @DATA Initialize READ/DATA pointer <0224> 63B7 BF,6E,09 DST VRAMVS,@VSPTR Initialize base of value stac 63BA 58 <0225> 63BB BD,24,6E DST @VSPTR,@STVSPT Save in permanent base <0226> 63BE BD,A3,88 DST @VSPTR,V@SAVEVP 63C1 6E <0227> 63C2 06,68,C3 CALL INITPG Initialize program & s.t. <0228> 63C5 06,A0,18 CALL INTRND Initialize random number <0229> 63C8 8E,A3,71 CZ V@LODFLG <0230> 63CB 63,D3 BS TOPL02 If need auto-boot <0231> * RXB PATCH CODE ************* <0232> * CLR V@LODFLG Won't ever need to do again <0233> 63CD 43,D0 BR G63D0 <0234> <0235> * RXB PATCH CODE ****************************************** <0236> AORG >03D0 <0237> <0238> 63D0 06,64,8E G63D0 CALL AUTOLD Attempt an auto-boot 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0015 EDIT-359 <0239> * Label TOPL02 is used by auto-boot in detection of err <0240> 63D3 ERRRDY EQU $ <0241> 63D3 06,6A,84 TOPL02 CALL G6A84 Say READY <0242> 63D6 00 BYTE 0 * returns to TOPL15 <0243> 63D7 06,68,C3 TOPL05 CALL INITPG Initialize program space <0244> 63DA 06,68,DC TOPL10 CALL KILSYM Kill the symbol table <0245> * RXB PATCH CODE ************* <0246> * TOPL15 AND >F7,@FLAG If error in UDF execution <0247> 63DD 05,7E,14 TOPL15 B MYSRCH <0248> 63E0 BE,74,05 G63E0 ST 5,@KEYBD Select full keyboard <0249> 63E3 03 SCAN <0250> 63E4 86,74 CLR @KEYBD <0251> 63E6 BE,73,88 TOPL20 ST RSTK,@SUBSTK Initialize subroutine stack <0252> 63E9 BF,20,02 TOPL25 DST NLNADD,@VARW Screen addr = lower left corn 63EC E2 <0253> 63ED 86,80,89 CLR @RAMFLG Clear the RAMFLG <0254> 63F0 86,44 CLR @PRGFLG Make sure not in program mode <0255> * Check for auto-num mode <0256> 63F2 DA,45,01 CLOG >01,@FLAG If auto-num on <0257> 63F5 64,1E BS TOPL35 <0258> 63F7 A1,14,0E DADD @CURINC,@CURLIN Generate new line number <0259> 63FA D2,14,00 CGE 0,@CURLIN >32767? <0260> 63FD 64,05 BS TOPL30 <0261> 63FF B2,45,FE AND >FE,@FLAG If out of range->exit auto-nu <0262> 6402 05,64,1E B TOPL35 Merge in below <0263> * Must be a long branch!! <0264> 6405 D5,30,32 TOPL30 DCEQ @ENLN,@STLN Line might exist <0265> 6408 64,12 BS G6412 <0266> 640A BD,4A,14 DST @CURLIN,@FAC Ready for program search <0267> 640D 0F,7E XML SPEED <0268> 640F 03 BYTE SEETWO * Search for existence of line <0269> 6410 65,1D BS EDTZ05 COND set = line found <0270> 6412 0F,83 G6412 XML SCROLL Scroll to the next line <0271> 6414 BD,5E,14 DST @CURLIN,@ARG2 New line # <0272> 6417 06,6F,BA CALL DISO Display the line number <0273> 641A 91,20 DINC @VARW Following by a space <0274> 641C 44,20 BR G6420 <0275> 641E 0F,83 TOPL35 XML SCROLL Scroll the screen <0276> 6420 BE,A2,E1 G6420 ST >9E,V@NLNADD-1 Display the prompt character 6423 9E <0277> 6424 06,6A,76 CALL G6A76 Read in a line <0278> 6427 06,D0,AF CALL SAVLIN Save input line for recall <0279> * Crunch the input line <0280> 642A 86,22 CLR @ERRCOD Assume no-error return <0281> 642C BF,0A,08 DST CRNBUF,@RAMPTR Initialize crunch pointer 642F 20 <0282> 6430 0F,7F XML CRUNCH CRUNCH the input line <0283> 6432 00 BYTE 0 * Normal crunch mode <0284> 6433 8A,23 TOPL42 CASE @ERRCOD+1 <0285> 6435 44,45 BR TOPL45 No error detected <0286> 6437 49,7C BR ERRSYN *SYNTAX ERROR <0287> 6439 49,90 BR ERRBLN *BAD LINE NUMBER <0288> 643B 49,94 BR ERRLTL *LINE TOO LONG <0289> 643D 49,86 BR ERRNTL *NAME TOO LONG <0290> 643F 49,80 BR ERRNQS *UNMATCHED QUOTES <0291> 6441 49,9A BR ERRCIP *COMMAND ILLEGAL IN PROGRAM <0292> 6443 49,A4 BR ERRIVN *UNRECOGNIZED CHARACTER <0293> 6445 8F,4A TOPL45 DCZ @FAC Line # present <0294> 6447 64,62 BS TOPL55 <0295> 6449 DA,45,01 CLOG >01,@FLAG Not AUTONUM <0296> 644C 44,5B BR G645B <0297> 644E D6,75,0D CEQ >0D,@RKEY Must be up or down <0298> 6451 64,5B BS G645B <0299> 6453 D6,42,01 CEQ >01,@CHAT Start EDIT mode 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0016 EDIT-359 <0300> 6456 44,5B BR G645B <0301> 6458 05,D0,00 B EDTZZ0 <0302> 645B 06,66,CF G645B CALL EDITLN EDIT the line into the progra <0303> 645E 63,E9 BS TOPL25 If didn't change the line <0304> 6460 43,DA BR TOPL10 <0305> * Jump always <0306> 6462 D6,42,01 TOPL55 CEQ >01,@CHAT If blank line - ignore <0307> 6465 63,E9 BS TOPL25 <0308> 6467 D6,A8,20 CEQ >EB,V@CRNBUF 646A EB <0309> 646B 65,C9 BS SZSIZE <0310> 646D C6,A8,20 CH >08,V@CRNBUF If imperative 6470 08 <0311> * GKXB Branch code for new commands DEL, COPY, and MOVE. <0312> 6471 77,59 BS NEWCMD Go here to test for new <0313> * keywords <0314> 6473 BF,2C,08 DST CRNBUF+1,@PGMPTR Anticipate usage of PGMCHR 6476 21 <0315> 6477 0F,79 XML PGMCHR Prepare CHAT for OLD and SAVE <0316> 6479 8A,A8,20 CASE V@CRNBUF Select the keyword <0317> 647C 43,A5 BR SZNEW NEW 0 <0318> 647E 45,20 BR SZCONT CONTINUE 1 <0319> 6480 45,BE BR SZLIST LIST 2 <0320> 6482 45,BA BR SZBYE BYE 3 <0321> 6484 45,60 BR SZNUM NUMBER 4 <0322> 6486 45,B7 BR SZOLD OLD 5 <0323> 6488 46,25 BR SZRES RESEQUENCE 6 <0324> 648A 45,AF BR SZSAVE SAVE 7 <0325> 648C 45,C6 BR SZMERG MERGE 8 <0326> * AUTO-BOOT - attempt a ----> RUN "DSK1.LOAD" <0327> 648E 31,00,0B AUTOLD MOVE 11,G@DSCLOD,V@CRNBUF 6491 A8,20,63 6494 51 <0328> 6495 BF,2C,08 DST CRNBUF,@PGMPTR DSK1.LOAD is in crunch buffer 6498 20 <0329> * RXB PATCH CODE ************* <0330> * BR SZRUNL Go to the RUN "NAME" CODE <0331> 6499 5A,97 BR MYRUN <0332> ********************************* RUN ********************* <0333> 649B D6,42,C7 SZRUN CEQ >C7,@CHAT Ready for 'RUN "NAME" ---- <0334> 649E 44,BF BR G64BF <0335> 64A0 BD,58,2C SZRUNL DST @PGMPTR,@FAC14 Save pointer to name <0336> 64A3 0F,79 XML PGMCHR Get the length of the string <0337> 64A5 BC,57,42 ST @CHAT,@FAC13 Put it in FAC13 <0338> 64A8 86,56 CLR @FAC12 Make it a double byte <0339> 64AA A1,2C,56 DADD @FAC12,@PGMPTR Skip the string <0340> 64AD 0F,79 XML PGMCHR To see there is line no. ahea <0341> 64AF 06,80,24 CALL G8024 Only RUN "NAME" ? <0342> 64B2 49,7C BR ERRSYN No - junk on end so error <0343> 64B4 BE,42,C7 ST STRINZ,@CHAT Prepare for LOAD routine <0344> 64B7 BD,2C,58 DST @FAC14,@PGMPTR Restore the saved PGMPTR <0345> 64BA 06,80,26 CALL OLD1 Load the program <0346> 64BD 44,DA BR SZRUN0 Go ahead from here <0347> * No RUN "NAME" : just run the <0348> * current program in memory <0349> 64BF D6,42,C9 G64BF CEQ >C9,@CHAT Is there a line # after RUN? <0350> 64C2 44,D5 BR G64D5 <0351> 64C4 0F,79 XML PGMCHR Get the line number <0352> 64C6 BC,4A,42 ST @CHAT,@FAC Put it in FAC for SEETWO <0353> 64C9 0F,79 XML PGMCHR <0354> 64CB BC,4B,42 ST @CHAT,@FAC1 <0355> 64CE 0F,79 XML PGMCHR Should be EOS now <0356> 64D0 06,80,24 CALL G8024 Is it? <0357> 64D3 64,EA BS SZRUN2 Yes - Go ahead from here 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0017 EDIT-359 <0358> * Just 'RUN' <0359> 64D5 06,80,24 G64D5 CALL G8024 Should be EOS now <0360> 64D8 49,7C BR ERRSYN No-SYNTAX ERROR <0361> 64DA D5,30,32 SZRUN0 DCEQ @ENLN,@STLN Refuse without program <0362> 64DD 64,EF BS ILLST <0363> 64DF BD,A3,72 DST @ENLN,V@START Defualt to beginning 64E2 32 <0364> 64E3 A7,A3,72 DSUB 3,V@START Offset into the table 64E6 00,03 <0365> 64E8 45,02 BR SZRUN1 Merge in below <0366> * Jump always <0367> 64EA D5,30,32 SZRUN2 DCEQ @ENLN,@STLN Refuse without program <0368> 64ED 44,F9 BR G64F9 <0369> 64EF 0F,83 ILLST XML SCROLL Scroll the screen for message <0370> 64F1 86,44 CLR @PRGFLG Prevent line # printing <0371> 64F3 06,6A,82 WRNNPP CALL G6A82 <0372> 64F6 1D BYTE 29 * NO PROGRAM PRESENT <0373> 64F7 43,DD BR TOPL15 <0374> * Condition can never be set since line 0 is prohibited <0375> 64F9 0F,7E G64F9 XML SPEED <0376> 64FB 03 BYTE SEETWO * Find the line in the program <0377> 64FC 49,8C BR ERRLNF * LINE NOT FOUND <0378> 64FE BD,A3,72 DST @EXTRAM,V@START Program run starts here 6501 2E <0379> * GKXB RUN code for color change. <0380> 6502 57,74 SZRUN1 BR RUNPAT Change colors. <0381> 6504 06,80,12 G6504 CALL CLSALL Close any open files <0382> 6507 92,44 DEC @PRGFLG Put it back in execution <0383> 6509 BC,80,89 ST @RAMTOP+1,@RAMFLG Set/reset RAMFLG flag -- when 650C 80,85 <0384> 650E 87,A3,86 DCLR V@SEXTRM in program mode & ERAM exist <0385> 6511 87,A3,8A DCLR V@ERRLN Disallow CONTINUE after RUN <0386> 6514 06,68,DC CALL KILSYM Reset ERR handling to defualt <0387> 6517 BE,73,88 ST RSTK,@SUBSTK Set the stack empty <0388> * RXB PATCH CODE ************ Turn off DSK#.LOAD search <0389> * SZRUN4 B G6A70 <0390> 651A 05,7E,24 SZRUN4 B SCHOFF Turn off search first then G6 <0391> 651D 05,D0,0D EDTZ05 B EDTZ00 <0392> **************************** CONTINUE ********************* <0393> 6520 06,68,45 SZCONT CALL GETNB Check for END-OF-LINE <0394> 6523 49,7A BR ERRSY1 Junk on end of command <0395> 6525 8F,A3,86 DCZ V@SEXTRM If can continue <0396> 6528 65,5C BS ERRCC <0397> 652A 0F,83 XML SCROLL <0398> 652C BD,2E,A3 DST V@SEXTRM,@EXTRAM Copy old line table pointer 652F 86 <0399> 6530 BD,2C,A3 DST V@SPGMPT,@PGMPTR Copy old text pointer 6533 82 <0400> 6534 BD,46,A3 DST V@SBUFLV,@BUFLEV Copy old buffer level 6537 84 <0401> 6538 BD,48,A3 DST V@SLSUBP,@LSUBP Copy last subprogram on stack 653B 96 <0402> 653C B4,45,A3 OR V@SFLAG,@FLAG Restore on-warning/break bits 653F 98 <0403> 6540 C5,6E,A3 G6540 DCH V@SAVEVP,@VSPTR While extra on stack 6543 88 <0404> 6544 45,4A BR G654A <0405> 6546 0F,78 XML VPOP Pop them off <0406> 6548 45,40 BR G6540 <0407> 654A BE,44,FF G654A ST >FF,@PRGFLG Idicate program mode <0408> 654D BC,80,89 ST @RAMTOP+1,@RAMFLG Set/reset RAMFLG flag --- whe 6550 80,85 <0409> * in program mode & ERAM exist <0410> 6552 87,A3,86 DCLR V@SEXTRM Prevent unauthorized CONTINUE 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0018 EDIT-359 <0411> 6555 BF,A3,88 DST VRAMVS,V@SAVEVP Init for program completion 6558 09,58 <0412> 655A 0F,81 XML CONTIN Resume normal execution <0413> 655C 06,6A,84 ERRCC CALL G6A84 Indicate error <0414> 655F 19 BYTE 25 * "* CAN'T CONTINUE" <0415> **************************** NUMBER *********************** <0416> *---------------------------------------------------------- <0417> * Fix NUMBER command cause XB goes into a loop displaying <0418> * *PROTECTION VIOLATION when a PROTECTED program is in <0419> * memory bug, add the following line after label SZNEW <0420> 6560 DA,45,80 SZNUM CLOG >80,@FLAG Check PROTEDTION VIOLATION <0421> 6563 49,A0 BR ERRPV <0422> *---------------------------------------------------------- <0423> 6565 06,65,71 CALL AUTON Get start line # and incremen <0424> 6568 B6,45,01 OR >01,@FLAG Set AUTONUM bit for future us <0425> 656B BF,20,02 DST NLNADD,@VARW Initialize screen address 656E E2 <0426> 656F 44,05 BR TOPL30 Jump back into it <0427> * Jump always <0428> *********************************************************** <0429> * AUTON - scans the NUM, LIST and RES commands for line <0430> * numbers. Leaves 1st line number in CURLIN and 2nd line <0431> * number in CURINC. AUTON is entry point from NUM to defual <0432> * to 100,10 AUTON is entry point for LIST. <0433> *********************************************************** <0434> 6571 BF,14,00 AUTON DST 100,@CURLIN Defualt start 6574 64 <0435> * GKXB AUTO4 label <0436> 6575 BF,0E,00 AUTO4 DST 10,@CURINC Defualt increment 6578 0A <0437> 6579 BE,08,2C ST COMMA,@VARC Comma is the separator <0438> 657C 93,20 AUTO1 DDEC @VARW Don't miss the first characte <0439> * GKXB AUTO3 label <0440> 657E 06,68,45 AUTO3 CALL GETNB Get 1st character after keywo <0441> 6581 65,AE BS AUTO2 If end of line <0442> 6583 06,68,6A CALL GETLN Try to get a line number <0443> 6586 8E,0C CZ @BYTES If digits gotten <0444> 6588 65,8D BS G658D <0445> 658A BD,14,4A DST @FAC,@CURLIN Set initial <0446> 658D 06,68,4A G658D CALL GETNB2 Allow spaces before separator <0447> 6590 C5,20,2A DCH @VARA,@VARW Check end of line <0448> 6593 65,AE BS AUTO2 <0449> 6595 D4,42,08 CEQ @VARC,@CHAT If not correct separator <0450> * GKXB Modification to the RES to allow renumbering a <0451> * portion of a program. <0452> 6598 5A,0E BR CKLIST GKXB AUTON for record length. <0453> * GKXB AUTO5 label <0454> 659A 06,68,45 AUTO5 CALL GETNB Get char after separator <0455> 659D 65,AE BS AUTO2 If end of line <0456> 659F 06,68,6A CALL GETLN Try to get 2nd number <0457> 65A2 8E,0C CZ @BYTES If digits gotten <0458> 65A4 65,A9 BS G65A9 <0459> 65A6 BD,0E,4A DST @FAC,@CURINC Save the increment <0460> 65A9 06,68,4A G65A9 CALL GETNB2 Check EOL <0461> * GKXB Modification to the RES to allow renumbering a <0462> * portion of a program. <0463> 65AC 56,F9 BR RES2 GKXB AUTON for range check <0464> 65AE 00 AUTO2 RTN <0465> *************************** SAVE ************************** <0466> 65AF D5,30,32 SZSAVE DCEQ @ENLN,@STLN If no program <0467> 65B2 64,EF BS ILLST <0468> 65B4 05,80,14 B SAVE <0469> *************************** OLD *************************** <0470> 65B7 05,80,16 SZOLD B OLD 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0019 EDIT-359 <0471> *************************** BYE *************************** <0472> 65BA 06,80,12 SZBYE CALL CLSALL Properly close all files <0473> 65BD 0B SZEXIT EXIT Return to MONITOR <0474> *************************** LIST ************************** <0475> 65BE D5,30,32 SZLIST DCEQ @ENLN,@STLN Refuse LIST without prrogram <0476> 65C1 64,EF BS ILLST <0477> 65C3 05,80,18 B LIST LIST the program <0478> *************************** MERGE ************************* <0479> 65C6 05,80,28 SZMERG B MERGE <0480> *************************** SIZE ************************** <0481> * RXB SIZE PATCH CODE ******** <0482> * SZSIZE CZ V@CRNBUF+1 Must have EOL <0483> 65C9 05,69,AA SZSIZE B NSIZE <0484> 65CC 49,7C BR ERRSYN <0485> 65CE 0F,70 G65CE XML COMPCT Garbage collect to free space <0486> 65D0 BD,5E,1A DST @STREND,@ARG2 Get end of string space <0487> 65D3 A5,5E,6E DSUB @VSPTR,@ARG2 Subtract stack pointer <0488> 65D6 A7,5E,00 DSUB 63,@ARG2 Require 64-byte buffer 65D9 3F <0489> 65DA 0A GT If less then 64 bytes left <0490> 65DB 65,DF BS G65DF <0491> 65DD 87,5E DCLR @ARG2 Then indicate zero <0492> 65DF 0F,83 G65DF XML SCROLL Scroll the screen <0493> 65E1 BF,20,02 DST NLNADD+2,@VARW Begin a new line 65E4 E4 <0494> 65E5 06,6F,BA CALL DISO Display the number <0495> 65E8 8E,80,84 CZ @RAMTOP If no ERAM present <0496> 65EB 45,F7 BR G65F7 <0497> 65ED 31,00,0A MOVE 10,G@MSGFRE,V@1(@VARW) 65F0 E0,01,20 65F3 62,D3 <0498> 65F5 46,21 BR G6621 <0499> 65F7 31,00,13 G65F7 MOVE 19,G@MSGSFR,V@1(@VARW) 65FA E0,01,20 65FD 62,DD <0500> 65FF 0F,83 XML SCROLL Scroll the screen <0501> 6601 BF,20,02 DST NLNADD+2,@VARW Beginning of line 6604 E4 <0502> 6605 BD,5E,80 DST @RAMFRE,@ARG2 Calculate space in ERAM 6608 86 <0503> 6609 A7,5E,A0 DSUB CPUBAS-1,@ARG2 Subtract base 660C 3F <0504> 660D 06,6F,BA CALL DISO Display the number <0505> 6610 31,00,10 MOVE 16,G@MSGGFR,V@1(@VARW) 6613 E0,01,20 6616 62,F0 <0506> * RXB SIZE PATCH CODE ******** <0507> 6618 0F,83 G6618 XML SCROLL <0508> 661A 31,00,0A MOVE 10,G@MSGGF1,V@NLNADD+4 661D A2,E6,63 6620 00 <0509> 6621 0F,83 G6621 XML SCROLL Scroll the screen <0510> * RXB SIZE PATCH CODE ******** <0511> * BR TOPL15 Return to top-level <0512> 6623 00 G6623 RTN <0513> 6624 00 RTN RXB wasted byte. [0006] *********************************************************** [0007] COPY 'DSK5.MYXB3-C' <0001> ************************** RESEQUENCE ********************* <0002> 6625 D5,30,32 SZRES DCEQ @ENLN,@STLN If no program <0003> 6628 64,EF BS ILLST <0004> * GKXB Modification to the RES command to allow renumbering <0005> * a portion of the program. <0006> 662A 06,76,EB CALL RES1 GKXB pickup of renage 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0020 EDIT-359 <0007> * GKXB RES6 label <0008> 662D BD,4A,66 RES6 DST @XENLN,@FAC GKXB Compute # of increments <0009> 6630 A5,4A,64 DSUB @XSTLN,@FAC GKXB Actual number of lines - <0010> 6633 E7,4A,00 DSRL 2,@FAC Also takes care of this ^^^ 6636 02 <0011> 6637 A9,4A,0E DMUL @CURINC,@FAC Compute space taken by increm <0012> 663A 8F,4A DCZ @FAC Bad line number <0013> 663C 49,90 BR ERRBLN <0014> 663E A1,14,4C DADD @FAC2,@CURLIN Compute highest address used <0015> 6641 0C CARRY Watch out for overflow <0016> 6642 69,90 BS ERRBLN <0017> 6644 C6,14,7F CH >7F,@CURLIN Overflow is > 32767 <0018> 6647 69,90 BS ERRBLN <0019> 6649 BC,80,89 ST @RAMTOP+1,@RAMFLG Set/reset RAMFLG to use PGMCH 664C 80,85 <0020> 664E 86,60 CLR @ARG4 To be used for double add <0021> * GKXB Modification to the RES command to allow renumbering <0022> * a portion of the program. <0023> 6650 06,77,34 CALL RES4 GKXB Check high line # for ov <0024> 6653 BD,00,70 DST @>8370,@VAR0 Assume VDP-top <0025> 6656 8E,80,89 CZ @RAMFLG But if ERAM exists <0026> 6659 66,5F BS G665F <0027> 665B BD,00,80 DST @RAMTOP,@VAR0 Top for ERAM 665E 84 <0028> 665F 95,2C G665F DINCT @PGMPTR Skip EOL and count <0029> 6661 0F,79 G6661 XML PGMCHR VDP RAM or ERAM <0030> 6663 D6,42,C7 CEQ >C7,@CHAT Skip strings <0031> 6666 66,6D BS SEQZ2 <0032> 6668 D6,42,C8 CEQ >C8,@CHAT If numeric <0033> 666B 46,77 BR G6677 <0034> 666D 0F,79 SEQZ2 XML PGMCHR Get next token (count) <0035> 666F BC,61,42 ST @CHAT,@ARG5 For double add <0036> 6672 A1,2C,60 DADD @ARG4,@PGMPTR Up to end of string <0037> 6675 46,AA BR G66AA <0038> 6677 D6,42,C9 G6677 CEQ >C9,@CHAT Check for line # <0039> 667A 46,AA BR G66AA <0040> 667C 06,80,2C CALL GRSUB2 Get the line # in the text <0041> 667F 2C BYTE PGMPTR * @PGMPTR : Source addr on ERAM <0042> 6680 BD,52,58 DST @EEE1,@FAC8 Save it temporary place <0043> 6683 BD,5E,14 DST @CURLIN,@ARG2 Set for searching <0044> * GKXB Modification to the RES command to allow renumbering <0045> * a portion of the program. <0046> 6686 BD,5C,64 DST @XSTLN,@ARG GKXB New segment start <0047> 6689 06,80,2E G6689 CALL GRSUB3 Read the line # fromn ERAM <0048> * (use GREAD1) or VDP, reset <0049> * possible breakpoint too <0050> 668C 5C BYTE ARG * @ARG : Source addr on ERAM/VD <0051> 668D D5,52,58 DCEQ @EEE1,@FAC8 <0052> 6690 66,A2 BS SEQZ3 <0053> 6692 A5,5E,0E DSUB @CURINC,@ARG2 Update new line # <0054> 6695 A3,5C,00 DADD 4,@ARG And entry in line # table 6698 04 <0055> * GKXB Modification to the RES command to allow renumbering <0056> * a portion of the program. <0057> 6699 C5,5C,66 DCH @XENLN,@ARG GKXB New segment end <0058> 669C 46,89 BR G6689 <0059> 669E 46,A8 BR G66A8 GKXB Skip replacing undefined <0060> * line # with 32767 <0061> 66A0 7F,FF DATA >7FFF * GKXB unused bytes <0062> 66A2 06,68,28 SEQZ3 CALL GWSUB Write a few bytes of data <0063> * @PGMPTR : Destination address on ERAM/VDP <0064> * @ARG2 : Data <0065> * 2 : Byte count <0066> 66A5 2C,5E,02 BYTE PGMPTR,ARG2,2 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0021 EDIT-359 <0067> 66A8 95,2C G66A8 DINCT @PGMPTR Pass two byte line # in text <0068> 66AA 87,80,D6 G66AA DCLR @>83D6 Reset VDP timeout <0069> 66AD C9,2C,00 DCHE @VAR0,@PGMPTR And on end of program <0070> 66B0 46,61 BR G6661 <0071> * Now update the line # table itself <0072> * GKXB Modification to the RES command to allow renumbering <0073> * a portion of the program. <0074> 66B2 BD,4A,64 DST @XSTLN,@FAC GKXB New segment start <0075> 66B5 BD,5C,14 DST @CURLIN,@ARG With start address off course <0076> 66B8 06,68,28 G66B8 CALL GWSUB Write a few bytes of data to <0077> * ERAM (use GWRITE) or VDP <0078> * @FAC : Destination address on ERAM/VDP <0079> * @ARG : Data <0080> * 2 : Byte count <0081> 66BB 4A,5C,02 BYTE FAC,ARG,2 <0082> 66BE A5,5C,0E DSUB @CURINC,@ARG Compute next line # <0083> 66C1 A3,4A,00 DADD 4,@FAC And next entry in line # tabl 66C4 04 <0084> * GKXB Modification to the RES command to allow renumbering <0085> * a portion of the program. <0086> 66C5 C5,4A,66 DCH @XENLN,@FAC GKXB New segment end# table <0087> 66C8 46,B8 BR G66B8 <0088> 66CA 86,80,89 CLR @RAMFLG Restore the ERAM flag <0089> * GKXB Modification to the RES command to allow renumbering <0090> * a portion of the program. <0091> 66CD 57,52 BR RES5 GKXB find out where to return <0092> *********************************************************** <0093> * EDIT a line into a program <0094> * <0095> * Must be called with the following set up: <0096> * FAC = line number of line to be edited into program <0097> * CHAT = length of line <0098> * CRNBUF = crunched line <0099> *********************************************************** <0100> 66CF DA,45,80 EDITLN CLOG >80,@FLAG Protection violation <0101> 66D2 49,A0 BR ERRPV <0102> 66D4 06,80,12 CALL CLSALL Close any open files <0103> 66D7 06,68,DC CALL KILSYM Kill symbol table <0104> 66DA 86,02 CLR @STPT Restore STPT <0105> 66DC BC,03,42 ST @CHAT,@STPT+1 <0106> *********************************************************** <0107> * @CHAT=1 ? YES : LINE NUMBER ONLY - GO TO DELETE THE LINE <0108> * NO : INSERT A NEW LINE OR REPLACE EXISTING LIN <0109> *********************************************************** <0110> 66DF D6,42,01 CEQ >01,@CHAT Something besides line # <0111> 66E2 47,30 BR INSREP <0112> 66E4 DA,45,01 CLOG >01,@FLAG Auto-number mode on <0113> 66E7 66,F0 BS G66F0 <0114> 66E9 B2,45,FE AND >FE,@FLAG Reset AUTONUM mode <0115> 66EC D4,00,00 RTNSET CEQ @>8300,@>8300 Set condition bit <0116> 66EF 01 RTNC And return <0117> 66F0 D5,30,32 G66F0 DCEQ @ENLN,@STLN If no program <0118> 66F3 66,EC BS RTNSET <0119> *********************************************************** <0120> * EDITZ1 Delete the line # from line-#-buffer. <0121> * Delete the text from program text area. <0122> *********************************************************** <0123> 66F5 0F,7E EDITZ1 XML SPEED Try to find the given line # <0124> 66F7 03 BYTE SEETWO <0125> 66F8 46,EC BR RTNSET Return if not found <0126> 66FA 0F,87 XML DELREP Remove it's text from program <0127> * Delete the 4 bytes from the line # table <0128> 66FC BD,06,2E DST @EXTRAM,@VARY2 Pointer to line pointer <0129> 66FF 91,06 DINC @VARY2 Advance to last byte of entry 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0022 EDIT-359 <0130> 6701 97,2E DDECT @EXTRAM Point to first byte of entry <0131> 6703 BD,00,2E DST @EXTRAM,@VAR0 <0132> 6706 93,00 DDEC @VAR0 Last byte of next line entry <0133> * Move down 4 bytes from here <0134> 6708 A5,2E,30 DSUB @STLN,@EXTRAM # of bytes to move down <0135> 670B 8F,2E DCZ @EXTRAM <0136> 670D 67,14 BS G6714 <0137> 670F BD,5C,2E DST @EXTRAM,@ARG Put in arg for MVDN <0138> 6712 0F,88 XML MVDN Move one byte at a time <0139> 6714 A3,30,00 G6714 DADD >04,@STLN New start addr of line # tab 6717 04 <0140> 6718 8E,80,84 CZ @RAMTOP If ERAM not exist <0141> 671B 47,24 BR G6724 <0142> 671D C5,30,70 DCH @>8370,@STLN Delete the only line <0143> 6720 63,D7 BS TOPL05 <0144> 6722 47,2E BR G672E With ERAM <0145> 6724 8F,30 G6724 DCZ @STLN <0146> 6726 63,D7 BS TOPL05 <0147> 6728 C5,30,80 DCH @RAMTOP,@STLN 672B 84 <0148> 672C 63,D7 BS TOPL05 <0149> 672E 48,DC G672E BR KILSYM Kill symbol table with return <0150> *********************************************************** <0151> * INSERT A NEW LINE OR REPLACE AN EXISTING LINE <0152> *********************************************************** <0153> * BUILD LINE # AND LINE POINTER IN VARY, +1, +2, +3, +4 <0154> 6730 BD,04,4A INSREP DST @FAC,@VARY 2 bytes of line # <0155> 6733 BD,06,32 DST @ENLN,@VARY2 Last address of line-#-table <0156> 6736 BD,2E,32 DST @ENLN,@EXTRAM Prepare to search the line # <0157> *********************************************************** <0158> * 1ST LINE IN MEMORY : EDITZ5 -- EDITZ6 -- EDITZ8 -- DONE <0159> *********************************************************** <0160> 6739 D5,30,32 DCEQ @ENLN,@STLN 1st text? <0161> 673C 67,88 BS EDITZ5 <0162> *********************************************************** <0163> * EDITZ3 <0164> * COMPARE LINE # IN FAC WITH LINE # IN THE LINE # TABLE <0165> * EQUATE : --DELTX--EDITZ8-DONE <0166> * HIGHER : HIGHEST LINE? YES : EDITZ6--EDITZ8--DONE <0167> * NO : BACK TO EDITZ3 <0168> * LOWER : EDITZ4--EDITZ8--DONE <0169> *********************************************************** <0170> 673E 91,2E DINC @EXTRAM Get line <0171> 6740 A7,2E,00 EDITZ3 DSUB 4,@EXTRAM Go to next line in program 6743 04 <0172> 6744 06,68,10 CALL GRSUB1 Read from ERAM(use GREAD)/VDP <0173> 6747 2E BYTE EXTRAM * @EXTRAM : Source addr on ERAM <0174> * or VDP <0175> 6748 B2,50,7F AND >7F,@EEE Reset possible breakpoint <0176> 674B D5,4A,50 DCEQ @EEE,@FAC If #s match-delete old <0177> 674E 67,EC BS DELTX <0178> 6750 BF,2A,00 DST 4,@VARA For MEMFUL 6753 04 <0179> 6754 09 H New line # is greater <0180> 6755 47,5E BR G675E <0181> 6757 D5,2E,30 DCEQ @STLN,@EXTRAM Line to be inserted got the <0182> * highest line number in line <0183> * # table :: add to the end of <0184> * line-#table <0185> 675A 67,8C BS EDITZ6 <0186> 675C 47,40 BR EDITZ3 <0187> *********************************************************** <0188> * EDITZ4 <0189> * ALLOCATE SPACE IN LINE # TABLE BY MOVING 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0023 EDIT-359 <0190> * PART (ARG=4) OF THE LINE # TABLE UP <0191> *********************************************************** <0192> 675E BF,5C,00 G675E DST 4,@ARG 6761 04 <0193> 6762 A1,5C,2E EDITZ4 DADD @EXTRAM,@ARG <0194> 6765 A5,5C,30 DSUB @STLN,@ARG # of bytes in between <0195> 6768 BD,16,30 DST @STLN,@VAR9 Copy old start address of lin <0196> 676B 06,68,A3 CALL MEMFUL Check for memory full <0197> 676E A1,30,02 DADD @STPT,@STLN <0198> 6771 8E,80,84 CZ @RAMTOP <0199> 6774 47,7E BR G677E <0200> 6776 34,5C,B0 MOVE @ARG,V*VAR9,V*STLN Move line # table 6779 30,B0,16 <0201> 677C 47,83 BR G6783 <0202> 677E BD,00,30 G677E DST @STLN,@VAR0 Destination address for MVUP <0203> 6781 0F,89 XML MVUP Move the line # table up <0204> 6783 BD,06,32 G6783 DST @ENLN,@VARY2 Set up line ptr in line # ent <0205> 6786 47,95 BR EDITZ8 <0206> *********************************************************** <0207> * EDITZ5 <0208> * EDITZ6 <0209> * SET UP 1ST ENTRY IN LINE # TABLE BY GIVING @VARA=3 <0210> * WHEN INSERT THE HIGHEST LINE : <0211> * CONCATENATE LINE # ENTRY TO LINE # TABLE <0212> *********************************************************** <0213> 6788 BF,2A,00 EDITZ5 DST >03,@VARA Subtract >03 from STLN(@>8370 678B 03 <0214> * to get new start addr of tab <0215> 678C 06,68,A3 EDITZ6 CALL MEMFUL Check for memory full <0216> 678F A1,30,02 DADD @STPT,@STLN Concatenate line # entry to <0217> 6792 BD,2E,30 DST @STLN,@EXTRAM table <0218> *********************************************************** <0219> * EDITZ8 <0220> * UPDATE ENTRY IN LINE # TABLE, PUT TEXT IN -- DONE <0221> *********************************************************** <0222> 6795 EDITZ8 EQU $ <0223> * Update the 4 bytes entry in line # table <0224> 6795 91,06 DINC @VARY2 Point to 1st token (not lengt <0225> 6797 A5,06,02 DSUB @STPT,@VARY2 Set up the line pointer for V <0226> 679A 06,68,28 CALL GWSUB Write a few bytes of data to <0227> * ERAM (use GWRITE) or VDP <0228> * @EXTRAM : Destination address on ERAM/VDP <0229> * @VARY : Data <0230> * 4 : Byte count <0231> 679D 2E,04,04 BYTE EXTRAM,VARY,4 <0232> *********************************************************** <0233> * Now insert the line's text between the line number table <0234> * and the rest of the program's text <0235> *********************************************************** <0236> ********** GET THE LENGTH OF LINE # TABLE IN @ARG ********* <0237> 67A0 BD,5C,32 DST @ENLN,@ARG Highest addr for line # table <0238> 67A3 A5,5C,30 DSUB @STLN,@ARG Total length of line # table <0239> 67A6 91,5C DINC @ARG Add one for extra offset <0240> ****************** MOVE THE LINE # TABLE ****************** <0241> 67A8 BD,16,30 DST @STLN,@VAR9 Old start addr of line # tabl <0242> 67AB 91,02 DINC @STPT Point to next free byte in VD <0243> 67AD A5,30,02 DSUB @STPT,@STLN New entry to line # table <0244> 67B0 A5,32,02 DSUB @STPT,@ENLN <0245> 67B3 8E,80,84 CZ @RAMTOP If ERAM not exist <0246> 67B6 47,C0 BR G67C0 <0247> 67B8 34,5C,B0 MOVE @ARG,V*VAR9,V*STLN Move line # table 67BB 30,B0,16 <0248> 67BE 47,C5 BR G67C5 <0249> 67C0 BD,00,30 G67C0 DST @STLN,@VAR0 Set up destination addr for M 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0024 EDIT-359 <0250> 67C3 0F,89 XML MVUP Move line # table <0251> ****************** WRITE THE LENGTH BYTE ****************** <0252> 67C5 93,02 G67C5 DDEC @STPT Update length of text <0253> 67C7 93,06 DDEC @VARY2 Point to the length byte <0254> 67C9 06,68,28 CALL GWSUB Write a few bytes of data <0255> * to ERAM (use GWRITE) or VDP <0256> * @VAR2 : Destination address on ERAM or VDP <0257> * @(STPT+1) : Data <0258> * 1 : Byte count <0259> 67CC 06,03,01 BYTE VARY2,STPT+1,1 <0260> 67CF 91,06 DINC @VARY2 <0261> ********************* WRITE THE TEXT ********************** <0262> 67D1 8E,80,84 CZ @RAMTOP If ERAM not exist <0263> 67D4 47,DE BR G67DE <0264> 67D6 34,02,B0 MOVE @STPT,V@CRNBUF,V*VARY2 Move text 67D9 06,A8,20 <0265> 67DC 47,EA BR G67EA <0266> 67DE BF,4C,08 G67DE DST CRNBUF,@AAA Copy the text from crunch 67E1 20 <0267> * buffer (which is on VDP) to ERAM <0268> 67E2 BD,50,06 DST @VARY2,@BBB <0269> 67E5 BD,4E,02 DST @STPT,@CCC @CCC : Byte count <0270> 67E8 0F,8A XML VGWITE <0271> 67EA 48,DC G67EA BR KILSYM Kill symbol table and return <0272> *********************************************************** <0273> * REPLACE AN EXISTING LINE <0274> ************** Compute length of old entry **************** <0275> 67EC 95,2E DELTX DINCT @EXTRAM Point to the line pointer <0276> 67EE 06,68,10 CALL GRSUB1 Read from ERAM (use GREAD)/VD <0277> 67F1 2E BYTE EXTRAM * @EXTRAM : Source addr on ERAM <0278> 67F2 97,2E DDECT @EXTRAM Restore back <0279> 67F4 93,50 DDEC @EEE Point to the length byte <0280> 67F6 06,68,10 CALL GRSUB1 Read the length from ERAM/VDP <0281> 67F9 50 BYTE EEE * @EEE : Source addr on ERAM/VD <0282> 67FA BC,2B,50 ST @EEE,@VARA+1 <0283> 67FD 86,2A CLR @VARA Make a double byte <0284> 67FF 83,2A DNEG @VARA And get length difference <0285> 6801 06,68,A3 CALL MEMFUL Check for memory full <0286> 6804 A1,30,2A DADD @VARA,@STLN Update STLN <0287> 6807 0F,87 XML DELREP Remove old text (same line #) <0288> 6809 97,2E DDECT @EXTRAM Correct pointer <0289> ******* SET UP THE LINE POINTER IN LINE # ENTRY *********** <0290> 680B BD,06,32 DST @ENLN,@VARY2 Prepare setting up line point <0291> 680E 47,95 BR EDITZ8 Go update entry in line # tab <0292> * and put text in <0293> *********************************************************** <0294> * SUBROUTINE TO READ 2 BYTES OF DATA FROM VDP OR ERAM <0295> * (use GREAD) <0296> *********************************************************** <0297> 6810 88,4E GRSUB1 FETCH @FFF Fetch the source addr on ERAM <0298> 6812 BD,4C,90 DST *FFF,@DDD Put it in @DDD 6815 4E <0299> 6816 8E,80,84 CZ @RAMTOP If ERAM present <0300> 6819 68,23 BS G6823 <0301> 681B BF,4E,00 DST 2,@FFF @FFF : Byte count 681E 02 <0302> 681F 0F,85 XML GREAD Read data from ERAM <0303> * @EEE : Destination addr on CP <0304> 6821 48,27 BR G6827 ERAM not exists <0305> 6823 BD,50,B0 G6823 DST V*DDD,@EEE Read data from VDP 6826 4C <0306> 6827 00 G6827 RTN <0307> *********************************************************** <0308> * SUBROUTINE TO WRITE A FEW BYTES OF DATA TO VDP OR ERAM 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0025 EDIT-359 <0309> * (use GWRITE) <0310> *********************************************************** <0311> 6828 88,4C GWSUB FETCH @AAA Fetch the destination addr on <0312> 682A BD,4C,90 DST *AAA,@AAA ERAM/VDP 682D 4C <0313> 682E 88,51 FETCH @BBB+1 Fetch the source addr on CPU <0314> * where data is stored <0315> 6830 86,50 CLR @BBB Make a double byte <0316> 6832 88,4F FETCH @CCC+1 Fetch the byte count <0317> 6834 86,4E CLR @CCC Make a double byte <0318> 6836 8E,80,84 CZ @RAMTOP If ERAM exists <0319> 6839 68,3E BS G683E <0320> 683B 0F,86 XML GWRITE Write the data to ERAM <0321> 683D 00 RTN <0322> 683E 34,4E,B0 G683E MOVE @CCC,*BBB+1,V*AAA Write to VDP 6841 4C,90,51 <0323> 6844 00 RTN <0324> *********************************************************** <0325> * SUBROUTINE TO GET A NON-BLANK CHARACTER FROM LINE <0326> *********************************************************** <0327> 6845 06,68,50 GETNB CALL GETCHR Get a character <0328> 6848 66,EC BS RTNSET If end-of-line <0329> 684A D6,42,20 GETNB2 CEQ >20,@CHAT <0330> 684D 68,45 BS GETNB <0331> 684F 00 RTN <0332> *********************************************************** <0333> * SUBROUTNE TO GET A CHARACTER FROM LINE <0334> *********************************************************** <0335> 6850 C5,20,2A GETCHR DCH @VARA,@VARW <0336> 6853 66,EC BS RTNSET <0337> 6855 BC,42,B0 ST V*VARW,@CHAT Put character in @CHAT 6858 20 <0338> 6859 D6,42,7F CEQ >7F,@CHAT If not edge character <0339> 685C 68,64 BS G6864 <0340> 685E A6,42,60 SUB OFFSET,@CHAT >60 Screen character into ASCII <0341> 6861 91,20 DINC @VARW <0342> 6863 00 RTN <0343> 6864 A3,20,00 G6864 DADD 4,@VARW Skip to next line 6867 04 <0344> 6868 48,50 BR GETCHR <0345> * Jump always <0346> *********************************************************** <0347> * GETLN - Gets an line number after a command and puts it <0348> * into the FAC. If the character in CHAT when it is called <0349> * is not in the legal numeric range (0-9) then GETLN <0350> * GETLN returns with no other action. <0351> * Called by: AUTON, RUN, EDITLN <0352> *********************************************************** <0353> 686A 87,4A GETLN DCLR @FAC Assume no number <0354> 686C 86,0C CLR @BYTES Assume no digits <0355> 686E A6,42,30 GETLN2 SUB >30,@CHAT ASCII to normal range <0356> 6871 CA,42,0A CHE 10,@CHAT If numeric digit <0357> 6874 68,91 BS G6891 <0358> 6876 AB,4A,00 DMUL 10,@FAC Multiply by 10 6879 0A <0359> 687A 8F,4A DCZ @FAC Error if overflow <0360> 687C 48,9D BR GTLNER <0361> 687E BC,4B,42 ST @CHAT,@FAC1 Need to add in this digit <0362> 6881 A1,4A,4C DADD @FAC2,@FAC Add accumulator into last dig <0363> 6884 D3,4A,00 DCGE 0,@FAC Error if overflow 6887 00 <0364> 6888 48,9D BR GTLNER <0365> 688A 90,0C INC @BYTES Got another digit <0366> 688C 06,68,50 CALL GETCHR Get the next character 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0026 EDIT-359 <0367> 688F 48,6E BR GETLN2 If not EOS <0368> 6891 8E,0C G6891 CZ @BYTES If digits gotten <0369> 6893 68,99 BS G6899 <0370> 6895 8F,4A DCZ @FAC If hit natural zero <0371> 6897 68,9D BS GTLNER <0372> 6899 A2,42,30 G6899 ADD >30,@CHAT Put back into ASCII <0373> 689C 00 RTN <0374> 689D 0F,83 GTLNER XML SCROLL Scroll the screen <0375> 689F 86,44 CLR @PRGFLG Don't print a line number <0376> 68A1 49,90 BR ERRBLN * BAD LINE NUMBER <0377> 68A3 A1,2A,02 MEMFUL DADD @STPT,@VARA Total # of bytes to be added <0378> * GKXB MEMFLL label <0379> 68A6 A5,30,2A MEMFLL DSUB @VARA,@STLN New STLN <0380> 68A9 8E,80,84 CZ @RAMTOP <0381> 68AC 68,B5 BS G68B5 <0382> 68AE CB,30,A0 DCHE CPUBAS,@STLN Not enough memory 68B1 40 <0383> 68B2 48,BB BR MEMZ1 <0384> 68B4 00 RTN <0385> 68B5 CB,30,0A G68B5 DCHE VRAMVS+64+256,@STLN Memory full 68B8 98 <0386> 68B9 68,C2 BS G68C2 <0387> 68BB A1,30,2A MEMZ1 DADD @VARA,@STLN Back to old start line # tabl <0388> 68BE 06,6A,84 CALL G6A84 <0389> 68C1 0B BYTE 11 * MEMORY FULL <0390> 68C2 00 G68C2 RTN <0391> * Initialize program space <0392> 68C3 86,80,89 INITPG CLR @RAMFLG Reset RAMFLG <0393> 68C6 0F,8E XML GDTECT Search for ERAM & select ROM <0394> 68C8 BD,80,86 DST @RAMTOP,@RAMFRE Initialize free pointer 68CB 80,84 <0395> 68CD BD,30,70 DST @>8370,@STLN Assume VDP - initialize STLN <0396> 68D0 8E,80,84 CZ @RAMTOP If ERAM is present <0397> 68D3 68,D9 BS G68D9 <0398> 68D5 BD,30,80 DST @RAMTOP,@STLN Initialize STLN for ERAM 68D8 84 <0399> 68D9 BD,32,30 G68D9 DST @STLN,@ENLN Init ENLN based upon STLN <0400> * Kill the symbol table <0401> 68DC BD,40,30 KILSYM DST @STLN,@FREPTR Assume VDP and init free poin <0402> 68DF D5,40,70 DCEQ @>8370,@FREPTR <0403> 68E2 68,E6 BS G68E6 <0404> 68E4 93,40 DDEC @FREPTR Back off 1 if program present <0405> 68E6 8E,80,84 G68E6 CZ @RAMTOP If ERAM exists <0406> 68E9 68,FC BS G68FC <0407> 68EB BD,80,86 DST @STLN,@RAMFRE Update the @RAMFRE 68EE 30 <0408> 68EF D5,80,86 DCEQ @RAMTOP,@RAMFRE 68F2 80,84 <0409> 68F4 68,F9 BS G68F9 <0410> 68F6 93,80,86 DDEC @RAMFRE Back off 1 if program present <0411> 68F9 BD,40,70 G68F9 DST @>8370,@FREPTR Initialize VDP free pointer <0412> 68FC 87,3E G68FC DCLR @SYMTAB Kill symbol table <0413> 68FE 87,3A DCLR @SUBTAB Kill subprogram table <0414> 6900 BD,18,40 DST @FREPTR,@STRSP Initialize string space <0415> 6903 BD,1A,18 DST @STRSP,@STREND <0416> 6906 86,43 CLR @BASE Reset OPTION BASE to 0 <0417> 6908 87,A3,86 DCLR V@SEXTRM Disallow CONTINUE <0418> 690B BF,24,09 DST VRAMVS,@STVSPT Initialize base of value stac 690E 58 <0419> 690F BD,6E,24 DST @STVSPT,@VSPTR Initialize value stack pointe <0420> 6912 BD,A3,88 DST @VSPTR,V@SAVEVP Initialize pointer in VDP too 6915 6E <0421> 6916 00 RTN <0422> *********************************************************** 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0027 EDIT-359 <0423> * Data for the color tables (starts at >0800) <0424> * BYTE >D0,>00,>00,>00,>00,>00,>00,>00 <0425> * BYTE >00,>00,>00,>00,>00,>00,>00,>10 <0426> * BYTE >10,>10,>10,>10,>10,>10,>10,>10 <0427> * BYTE >10,>10,>10,>10,>10,>10,>10,>10 <0428> *********************************************************** <0429> 6917 07,80 CHRTA2 ALL >20+OFFSET Clear the screen <0430> 6919 BF,80,C0 DST >3567,@>83C0 Initialize random number gen 691C 35,67 <0431> 691E 31,00,10 MOVE 16,G@SPCCHR,V@>03F0 Cursor character 6921 A3,F0,63 6924 5C <0432> * RXB PATCH CODE <0433> 6925 BF,4A,04 CHRTAB DST >0400,@FAC Address of chracater tables 6928 00 <0434> 6929 BE,4C,5F ST 95,@FAC2 Number of characters <0435> 692C 06,7D,C5 CALL CHRTBL RXB character loader <0436> 692F 49,39 BR G6939 <0437> * RXB SUB CODE FOR SIZE ****** <0438> 6931 BF,20,02 SDISO DST NLNADD+2,@VARW * 6934 E4 <0439> 6935 06,6F,BA CALL DISO * <0440> 6938 00 RTN * <0441> ****************************** <0442> 6939 04,04 G6939 BACK 4 Border color = BLUE <0443> 693B 86,A8,00 CLR V@>0800 <0444> 693E 35,00,0E MOVE 14,V@>0800,V@>0801 6941 A8,01,A8 6944 00 <0445> 6945 BE,A8,0F ST >F0,V@>080F WHITE fore/transparent back 6948 F0 <0446> 6949 35,00,10 MOVE 16,V@>080F,V@>0810 694C A8,10,A8 694F 0F <0447> 6950 06,69,5A CALL SPRINT <0448> * This part might be moved up later, load special character <0449> * here. Don't load before hiding all sprites. <0450> 6953 39,00,06 MOVE 6,G@VDPREG,#1 6956 01,63,6C <0451> 6959 00 RTN <0452> * <0453> ****** Initialization of sprites. Enable 28 sprites. ****** <0454> * <0455> 695A 86,A7,80 SPRINT CLR V@>0780 Clear motion of all sprites <0456> 695D 35,00,6F MOVE >6F,V@>0780,V@>0781 6960 A7,81,A7 6963 80 <0457> * Replace the line for speeding up XB. 5/22/81 <0458> * ST 28,@MOTION All in motion <0459> 6964 86,7A CLR @MOTION All not in motion <0460> 6966 BE,A3,70 ST >D0,V@>0370 Sprites 29 to 32 unavailiable 6969 D0 <0461> 696A BF,A3,00 DST >C000,V@>0300 Hide the first sprites 696D C0,00 <0462> 696F 87,A3,02 DCLR V@>0302 Make first sprite transparent <0463> 6972 35,00,6C MOVE 108,V@>0300,V@>0304 Ripple for the rest 6975 A3,04,A3 6978 00 <0464> 6979 00 RTN <0465> * <0466> * ERROR messages in this file <0467> * <0468> 697A 86,44 ERRSY1 CLR @PRGFLG Without a line number <0469> 697C 06,6A,84 ERRSYN CALL G6A84 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0028 EDIT-359 <0470> 697F 03 BYTE 3 * SYNTAX ERROR <0471> 6980 0F,83 ERRNQS XML SCROLL Scroll up the screen <0472> 6982 06,6A,84 CALL G6A84 EOL before end of string <0473> 6985 05 BYTE 5 * UNMATCHED QUOTES message <0474> 6986 86,44 ERRNTL CLR @PRGFLG Don't print a line # <0475> 6988 06,6A,84 CALL G6A84 <0476> 698B 06 BYTE 6 * NAME TOO LONG <0477> 698C 06,6A,84 ERRLNF CALL G6A84 <0478> 698F 16 BYTE 22 * LINE NOT FOUND <0479> 6990 06,6A,84 ERRBLN CALL G6A84 <0480> 6993 17 BYTE 23 * BAD LINE NUMBER <0481> 6994 86,44 ERRLTL CLR @PRGFLG Don't print line number <0482> 6996 06,6A,84 CALL G6A84 Issue the error <0483> 6999 18 BYTE 24 * LINE TOO LONG <0484> 699A 0F,83 ERRCIP XML SCROLL Scrolling the screen <0485> 699C 06,6A,84 CALL G6A84 <0486> 699F 1A BYTE 26 * COMMAND ILLEGAL IN PROGRAM <0487> 69A0 06,6A,84 ERRPV CALL G6A84 <0488> 69A3 27 BYTE 39 * PROTECTION VIOLATION <0489> 69A4 86,44 ERRIVN CLR @PRGFLG Don't print line number <0490> 69A6 06,6A,84 CALL G6A84 <0491> 69A9 28 BYTE 40 * UNRECOGNIZED CHARACTER <0492> * <0493> * Other ERROR messages in the program <0494> * <0495> * ERRRDY * READY BYTE 0 <0496> * ERRMEM * MEMORY FULL BYTE 11 <0497> * ERRCC * CAN'T CONTINUE BYTE 25 <0498> * WRNNPP * NO PROGRAM PRESENT BYTE 29 <0499> *********************************************************** <0500> ************************** <0501> * RXB SIZE <0502> 69AA 8E,44 NSIZE CZ @PRGFLG * PROGRAM MODE? <0503> 69AC 49,B8 BR CSIZE <0504> 69AE 8E,A8,21 CZ V@CRNBUF+1 * NORMAL <0505> 69B1 51,4B BR ERROLP <0506> 69B3 06,69,C1 CALL SIZEAS <0507> 69B6 43,DD BR TOPL15 <0508> 69B8 06,71,5A CSIZE CALL CHKEND * CALL SIZE <0509> 69BB 06,69,C1 CALL SIZEAS <0510> 69BE 06,00,12 CALL RETURN <0511> 69C1 06,65,CE SIZEAS CALL G65CE <0512> 69C4 8E,80,84 CZ @RAMTOP <0513> 69C7 7E,7D BS AMSSIZ <0514> 69C9 35,00,06 MOVE 6,@>2002,@FAC 69CC 4A,8F,9D 69CF 02 <0515> 69D0 D7,4E,AA DCEQ >AA55,@FAC+4 69D3 55 <0516> 69D4 5E,7D BR AMSSIZ <0517> 69D6 BD,5E,4C DST @FAC+2,@ARG2 <0518> 69D9 A5,5E,4A DSUB @FAC,@ARG2 <0519> 69DC 06,69,31 CALL SDISO <0520> 69DF 31,00,11 MOVE 17,G@MESSAG,V@1(@VARW) 69E2 E0,01,20 69E5 7E,2A <0521> 69E7 06,66,18 CALL G6618 <0522> 69EA 05,7E,7D B AMSSIZ <0523> *********************************************************** <0524> <0525> AORG >0A70 <0526> 6A70 4F,EE G6A70 BR PRESCN <0527> 6A72 4A,72 BR $ Spare <0528> 6A74 4E,7C BR LLIST 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0029 EDIT-359 <0529> 6A76 4A,8E G6A76 BR READLN <0530> 6A78 51,5A BR CHKEND check End Of Statement <0531> 6A7A 4A,7A BR $ Was SEETWO - now spare <0532> 6A7C 4F,BA G6A7C BR DISO <0533> 6A7E 52,FD BR ENTER <0534> 6A80 53,43 BR ENT09 <0535> 6A82 4C,FD G6A82 BR WARNZZ <0536> 6A84 4D,4E G6A84 BR ERRZZ <0537> 6A86 4A,98 G6A86 BR READL1 <0538> 6A88 4A,A1 BR READ00 <0539> 6A8A 4A,95 BR READL3 <0540> 6A8C 4A,8C BR $ Spare [0008] *********************************************************** [0009] COPY 'DSK5.MYXB3-D' <0001> *********************************************************** <0002> * READLN - Read one logical line (up to four physical lines <0003> * from the keyboard. Interpret things like BACKSPACE, <0004> * INSERT, DELETE AND FORWARD. The total number of character <0005> * can be limited by changing the start value for ARG2 <0006> * (upper limit), and entering at READL1 and VARW has to <0007> * contain the start address of the feild, and VARA the <0008> * current highest wirte address. Entering at READ00 allows <0009> * for specification of the intial cursor-position. In this <0010> * case ARG5 has to be set to the cursor-position. Please se <0011> * to it that VARA, VARW, ARG2, and ARG4 have consistent <0012> * values, i.e. <0013> * VARW <= ARG5 <= VARA <= ARG2 <0014> * ARG4 indicates if the line has been changed. If so, it <0015> * contains a 0. If you enter READLN through READ00, you hav <0016> * to initialize ARG4 to a nonzero value, should you want to <0017> * use this feature. <0018> *********************************************************** <0019> *---------------------------------------------------------- <0020> * Fix "You cannot add characters to a line whose number is <0021> * multiple of 256, if that line was reached by typing eithe <0022> * an up arrow or a down arrow form a previous line" bug, <0023> * replace following 3 lines: <0024> * READLN ST >FF,@ARG7 Indicate non-check mode <0025> * DST >037D,@ARG2 Set default upper limit <0026> * DST @VARW,@VARA Default nothing entered yet <0027> * with <0028> 6A8E BF,5E,05 READLN DST >057D,@ARG2 Set default upper limit 6A91 7D <0029> 6A92 BD,2A,20 DST @VARW,@VARA Default to nothing entered ye <0030> 6A95 BE,63,FF READL3 ST >FF,@ARG7 Indicate non-check mode <0031> *---------------------------------------------------------- <0032> * Please make sure that VARA points at a space location, or <0033> * at the end-of-field. <0034> *-------------- ADD FOLLOWING LINES 6/12/81 --------------- <0035> 6A98 86,A3,74 READL1 CLR V@NOTONE Reset flag for ACCEPT SIZE to <0036> 6A9B BE,60,01 ST 1,@ARG4 This means "no change" in lin <0037> 6A9E BD,61,20 READL2 DST @VARW,@ARG5 Position cursor at start of f <0038> *---------------------------------------------------------- <0039> * Auto-repeat function is added for 99/4A, in PSCANS line <0040> * READ00 to READZ2+1 are changed to following code <0041> *---------------------------------------------------------- <0042> 6AA1 86,00 READ00 CLR @VAR0 Counter for auto-repeat fucti <0043> * <0044> * To get out of insert mode, we usually return here. <0045> * <0046> 6AA3 86,64 READ01 CLR @ARG8 Indicate normal operation mod <0047> 6AA5 BE,01,7E ST CURSOR,@VARV Use VARV for CURSOR/CHARACTER <0048> * Idicate one character and alternate current character <0049> * position between normal and cursor. 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0030 EDIT-359 <0050> 6AA8 C0,B0,61 READZ1 EX @VARV,V*ARG5 By alternating between the 6AAB 01 <0051> * normal character and the <0052> * cursor, we make the cursor <0053> 6AAC 86,79 CLR @TIMER blink <0054> * RXB PATCH CODE FOR USER ***** <0055> * G6AAE SCAN Scan for a character <0056> * RAND 99 Force randomize to be rando <0057> 6AAE 06,7D,2E G6AAE CALL DUSER USER from EDIT mode <0058> 6AB1 6A,CC BS READZ2 Found one!!!! <0059> 6AB3 90,00 G6AB3 INC @VAR0 Increment the auto-repeat cou <0060> 6AB5 D6,75,FF CEQ >FF,@RKEY It is an old key <0061> 6AB8 6A,C5 BS G6AC5 <0062> 6ABA CA,00,FE CHE >FE,@VAR0 Hold old key for a while <0063> 6ABD 4A,C5 BR G6AC5 <0064> 6ABF A6,00,1E SUB 30,@VAR0 Control repeat rate <0065> 6AC2 05,6A,CE B READZ5 <0066> 6AC5 C6,79,10 G6AC5 CH >10,@TIMER Time next character switch <0067> 6AC8 4A,AE BR G6AAE <0068> 6ACA 4A,A8 BR READZ1 Restart character blink cycle <0069> * <0070> * Correct if we ended up with a displayed cursor <0071> * <0072> 6ACC 86,00 READZ2 CLR @VAR0 <0073> 6ACE D6,01,7E READZ5 CEQ CURSOR,@VARV Will have to change once more <0074> 6AD1 6A,D7 BS G6AD7 <0075> 6AD3 C0,B0,61 EX @VARV,V*ARG5 Exchange for current cursor 6AD6 01 <0076> * GKXB key routines CTRL up, down, left, right <0077> 6AD7 05,7A,38 G6AD7 B CTRLS GKXB CTRL KEYS <0078> 6ADA 6B,D0 BS G6BD0 <0079> * <0080> * BREAK character handling comes first <0081> * <0082> 6ADC D6,75,02 G6ADC CEQ BREAK,@RKEY Saw break character <0083> 6ADF 4A,F4 BR G6AF4 <0084> 6AE1 B2,45,FE AND >FE,@FLAG Reset AUTONUM mode <0085> 6AE4 8E,44 CZ @PRGFLG If in run mode <0086> 6AE6 6D,4B BS BTOP15 <0087> *---------------------------------------------------------- <0088> * FIX FCTN4 breaks a program during an execution of INPUT, <0089> * ACCEPT, or LINPUT statement regardless of ON BREAK NEXT <0090> * flag bug 5/19/81 <0091> * Replace following 2 lines: <0092> * DST @SMTSRT,V@SPGMPT Save place for continue <0093> * B EXEC6D Interrupt execution <0094> * with: <0095> 6AE8 DA,45,40 CLOG >40,@FLAG If ON-BREAK-NEXT has not been <0096> 6AEB 4A,F4 BR G6AF4 set, i.e. break is illegal <0097> 6AED BD,A3,82 DST @SMTSRT,V@SPGMPT Save place for continue 6AF0 1E <0098> 6AF1 05,A0,0E B EXEC6D Interrupt execution <0099> *---------------------------------------------------------- <0100> * <0101> * Edit buffer recall <0102> * <0103> * RXB PATCH CODE ************ USER PATCH <0104> * G6AF4 CEQ RECALL,@RKEY If edit recall <0105> 6AF4 D6,75,FF G6AF4 CEQ >FF,@RKEY NO KEY---SO NEVER USE <0106> 6AF7 4B,2A BR G6B2A <0107> 6AF9 8E,44 CZ @PRGFLG Ignore if exec mode <0108> 6AFB 4A,A8 BR READZ1 <0109> 6AFD B2,45,FE AND >FE,@FLAG Reset AUTONUM <0110> 6B00 BF,20,03 DST NLNADD+32,@VARW Initialize to 32 below screen 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0031 EDIT-359 6B03 02 <0111> 6B04 0F,83 G6B04 XML SCROLL Scroll the screen <0112> 6B06 A7,20,00 DSUB 32,@VARW Line start is 32 lower now 6B09 20 <0113> 6B0A D5,20,A3 DCEQ V@BUFSRT,@VARW Until reach recall start 6B0D 8C <0114> 6B0E 4B,04 BR G6B04 <0115> 6B10 BD,2A,A3 DST V@BUFEND,@VARA Set old end of line 6B13 8E <0116> 6B14 BD,4A,2A DST @VARA,@FAC Calculate length of old line <0117> 6B17 A5,4A,20 DSUB @VARW,@FAC Subtract start from end <0118> 6B1A 6B,22 BS READZ3 If no characters to recall <0119> * RXB PATCH CODE FOR USER **** <0120> * MOVE @FAC,V@RECBUF,V*VARW Recall line <0121> 6B1C 34,4A,B0 MOVE @FAC,V*VARW,V*VARW 6B1F 20,B0,20 <0122> 6B22 BE,63,FF READZ3 ST >FF,@ARG7 Non-check mode <0123> 6B25 BD,61,20 DST @VARW,@ARG5 Cursor at beginning of line <0124> 6B28 4A,A1 BR READ00 Allow edit of line <0125> * <0126> * BACK-ARROW - Space back one position <0127> * <0128> 6B2A D6,75,08 G6B2A CEQ BACK,@RKEY Backup to previous position <0129> 6B2D 6C,E7 BS RBACK <0130> * <0131> * RIGHT-ARROW - Forward space <0132> * <0133> 6B2F D6,75,09 CEQ FORW,@RKEY Space one position <0134> 6B32 6C,E3 BS RFORW <0135> * <0136> * INSERT - Start INSERT mode here <0137> * <0138> 6B34 D6,75,04 CEQ INSRT,@RKEY Set INSERT flag <0139> 6B37 4B,3C BR G6B3C <0140> 6B39 BE,64,01 ST 1,@ARG8 Select INSERT mode <0141> * <0142> * DELETE - Delete the current character <0143> * <0144> 6B3C D6,75,03 G6B3C CEQ DLETE,@RKEY DELETE all right <0145> 6B3F 4B,94 BR G6B94 <0146> *------------ ADD THE FOLLOWING LINE 6/12/81 -------------- <0147> 6B41 86,A3,74 CLR V@NOTONE Reset flag for SIZE in ACCEPT <0148> 6B44 86,60 CLR @ARG4 Indicate definite change in l <0149> 6B46 D5,2A,61 DCEQ @ARG5,@VARA Not an empty line <0150> 6B49 6B,8E BS G6B8E <0151> 6B4B D6,B0,2A CEQ EDGECH,V*VARA If pointing at end 6B4E 7F <0152> 6B4F 4B,53 BR G6B53 <0153> 6B51 93,2A DDEC @VARA Backup up onto line <0154> 6B53 BD,5C,2A G6B53 DST @VARA,@ARG Move everything from right <0155> 6B56 A5,5C,61 DSUB @ARG5,@ARG of the cursor to the left <0156> 6B59 34,5C,B0 MOVE @ARG,V@1(@ARG5),V*ARG5 6B5C 61,E0,01 6B5F 61 <0157> 6B60 BD,5C,61 DST @ARG5,@ARG Start at the beginning <0158> 6B63 B2,5D,FC AND >FC,@ARG1 <0159> 6B66 B6,5D,1D OR >1D,@ARG1 Move over to the end of the l <0160> 6B69 C9,5C,2A G6B69 DCHE @VARA,@ARG Update all errors <0161> 6B6C 6B,7A BS G6B7A <0162> 6B6E C0,E0,04 EX V*ARG,V@4(@ARG) Restore edge characters 6B71 5C,B0,5C <0163> 6B74 A3,5C,00 DADD 32,@ARG Next victim please 6B77 20 <0164> 6B78 4B,69 BR G6B69 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0032 EDIT-359 <0165> 6B7A 93,2A G6B7A DDEC @VARA Pre-update end of string <0166> 6B7C D6,B0,2A CEQ EDGECH,V*VARA Hit edge character 6B7F 7F <0167> 6B80 4B,86 BR G6B86 <0168> 6B82 A7,2A,00 DSUB 4,@VARA Skip over edge characters 6B85 04 <0169> * For auto-repeat function 5/19/81 <0170> 6B86 D6,B0,2A G6B86 CEQ >20+OFFSET,V*VARA 6B89 80 <0171> 6B8A 6A,A3 BS READ01 <0172> 6B8C 91,2A DINC @VARA Locked at feild position <0173> 6B8E BE,B0,2A G6B8E ST >20+OFFSET,V*VARA Clear last position 6B91 80 <0174> 6B92 4A,A3 BR READ01 <0175> * <0176> * CLEAR - Clear the entire input line <0177> * <0178> 6B94 D6,75,07 G6B94 CEQ CLRLN,@RKEY Found CLEAR command <0179> 6B97 4B,B3 BR G6BB3 <0180> *-------------- ADD THE FOLLOWING LINE 6/12/81 ------------ <0181> 6B99 86,A3,74 CLR V@NOTONE Reset flag for SIZE in ACCEPT <0182> * Current maximum to minimum <0183> 6B9C D6,B0,2A G6B9C CEQ >7F,V*VARA Don't clear edges 6B9F 7F <0184> 6BA0 6B,A6 BS G6BA6 <0185> 6BA2 BE,B0,2A ST >20+OFFSET,V*VARA Blank line 6BA5 80 <0186> 6BA6 93,2A G6BA6 DDEC @VARA Pre-update end-of-line <0187> 6BA8 C9,2A,20 DCHE @VARW,@VARA Up to and including first pos <0188> 6BAB 6B,9C BS G6B9C <0189> 6BAD 91,2A DINC @VARA Undo last subtraction <0190> 6BAF 86,60 CLR @ARG4 Indicate change <0191> 6BB1 4A,9E BR READL2 And restart everything <0192> * General exit point. Unidentified control codes don't have <0193> * effect!!!!! <0194> 6BB3 D6,75,0D G6BB3 CEQ CHRTN,@RKEY Only react on CR/UP/DOWN <0195> 6BB6 6B,C2 BS G6BC2 <0196> 6BB8 D6,75,0B CEQ UPMV,@RKEY <0197> 6BBB 6B,C2 BS G6BC2 <0198> 6BBD D6,75,0A CEQ DOWN,@RKEY <0199> 6BC0 4A,A8 BR READZ1 <0200> 6BC2 D5,2A,5E G6BC2 DCEQ @ARG2,@VARA Check for block on last posit <0201> 6BC5 4B,CF BR G6BCF <0202> 6BC7 D6,B0,2A CEQ >20+OFFSET,V*VARA Blocked. . . . . . 6BCA 80 <0203> 6BCB 6B,CF BS G6BCF <0204> 6BCD 91,2A DINC @VARA Point beyond last character i <0205> * line <0206> 6BCF 00 G6BCF RTN ENTER the current line <0207> 6BD0 8E,63 G6BD0 CZ @ARG7 Check value of RKEY against g <0208> 6BD2 4C,3A BR VALIZ9 <0209> 6BD4 BD,5C,A3 DST V@VALIDP,@ARG Pick up the standard stuff 6BD7 B0 <0210> 6BD8 BC,5C,B0 ST V*ARG,@ARG V@VALIDP : Pointer to the 6BDB 5C <0211> * standard stuff <0212> 6BDC DA,5C,04 CLOG >04,@ARG Specified UPPER CASE <0213> 6BDF 6B,F0 BS G6BF0 <0214> 6BE1 C6,75,5A CH >5A,@RKEY Z too high for anything <0215> 6BE4 6C,1A BS VALIZ2 <0216> 6BE6 CA,75,41 CHE >41,@RKEY A already in range <0217> 6BE9 6C,3A BS VALIZ9 <0218> 6BEB D6,75,20 CEQ >20,@RKEY SPACE allow spaces in UALPHA <0219> 6BEE 6C,3A BS VALIZ9 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0033 EDIT-359 <0220> 6BF0 DA,5C,01 G6BF0 CLOG >01,@ARG Specified NUMERIC <0221> 6BF3 6C,0B BS G6C0B <0222> 6BF5 D6,75,45 CEQ >45,@RKEY E ? <0223> 6BF8 6C,3A BS VALIZ9 <0224> 6BFA D6,75,2E CEQ >2E,@RKEY . ? <0225> 6BFD 6C,3A BS VALIZ9 <0226> 6BFF D6,75,2B CEQ >2B,@RKEY + ? <0227> 6C02 6C,3A BS VALIZ9 <0228> 6C04 D6,75,2D CEQ >2D,@RKEY - ? <0229> 6C07 6C,3A BS VALIZ9 <0230> 6C09 4C,10 BR VALIZ1 now try DIGIT range <0231> 6C0B DA,5C,02 G6C0B CLOG >02,@ARG Digit range selected <0232> 6C0E 6C,1A BS VALIZ2 <0233> 6C10 CA,75,30 VALIZ1 CHE >30,@RKEY 0 ? <0234> 6C13 4C,1A BR VALIZ2 No good <0235> 6C15 CA,75,3A CHE >3A,@RKEY 9 ? <0236> 6C18 4C,3A BR VALIZ9 Numeric allright <0237> 6C1A BD,5C,A3 VALIZ2 DST V@VALIDP,@ARG Copy start address of string 6C1D B0 <0238> 6C1E BC,50,A3 ST V@VALIDL+1,@FAC6 and string length 6C21 B3 <0239> 6C22 4C,2A BR VALIZ4 now test given characters <0240> 6C24 D4,75,B0 VALIZ3 CEQ V*ARG,@RKEY valid!!!! 6C27 5C <0241> 6C28 6C,3A BS VALIZ9 <0242> 6C2A 91,5C VALIZ4 DINC @ARG Update actual address <0243> 6C2C 92,50 DEC @FAC6 and count # of characters <0244> 6C2E 4C,24 BR VALIZ3 <0245> 6C30 8E,80,CE G6C30 CZ @PRTNFN Wait for completion of previo <0246> 6C33 4C,30 BR G6C30 tone, and then <0247> 6C35 06,00,36 CALL TONE2 ---BEEP--- <0248> 6C38 4A,A8 BR READZ1 Continue in whatever mode we' <0249> * in now <0250> 6C3A 8E,64 VALIZ9 CZ @ARG8 INSERT mode? <0251> 6C3C 6C,91 BS G6C91 <0252> * INSERT - is COMPLICATED!!!!! Because of those edge charac <0253> * Shift up all things. . . . continue as a standard insert <0254> * VARA <= ARG2 <0255> 6C3E D5,2A,5E DCEQ @ARG2,@VARA If end of screen <0256> 6C41 6C,68 BS READZ4 <0257> *---------------------------------------------------------- <0258> * Fix Editing a line that has been retrived by the REDO key <0259> * and may garble the last few characters bug, 5/28/81 <0260> 6C43 D6,B0,2A CEQ EDGECH,V*VARA If at end of line 6C46 7F <0261> 6C47 4C,68 BR READZ4 <0262> 6C49 D7,2A,02 DCEQ >02FE,@VARA If also at end of screen 6C4C FE <0263> 6C4D 4C,64 BR G6C64 <0264> 6C4F 0F,83 XML SCROLL Scroll the screen <0265> 6C51 A7,20,00 DSUB 32,@VARW Back up line start address 6C54 20 <0266> 6C55 A7,2A,00 DSUB 28,@VARA Back up to current start line 6C58 1C <0267> 6C59 A7,5E,00 DSUB 32,@ARG2 Absolute high limit backs up 6C5C 20 <0268> 6C5D A7,61,00 DSUB 32,@ARG5 Current cursor position too 6C60 20 <0269> 6C61 05,6C,68 B READZ4 <0270> 6C64 A3,2A,00 G6C64 DADD 4,@VARA Skip to next line 6C67 04 <0271> *---------------------------------------------------------- <0272> 6C68 BD,5C,2A READZ4 DST @VARA,@ARG Use ARG as temp for insert <0273> 6C6B C5,5C,61 G6C6B DCH @ARG5,@ARG Move everything up to current 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0034 EDIT-359 <0274> * line <0275> 6C6E 4C,8A BR G6C8A <0276> 6C70 93,5C DDEC @ARG Copy lower location to higher <0277> 6C72 BC,E0,01 ST V*ARG,V@1(@ARG) Going from high to low 6C75 5C,B0,5C <0278> 6C78 D6,B0,5C CEQ EDGECH,V*ARG Bumped into wall again 6C7B 7F <0279> 6C7C 4C,88 BR G6C88 <0280> 6C7E A7,5C,00 DSUB 4,@ARG Skip the wall 6C81 04 <0281> 6C82 BC,E0,05 ST V*ARG,V@5(@ARG) And move character over 6C85 5C,B0,5C <0282> 6C88 4C,6B G6C88 BR G6C6B <0283> 6C8A C9,2A,5E G6C8A DCHE @ARG2,@VARA Only update VARA if upper <0284> 6C8D 6C,91 BS G6C91 <0285> 6C8F 91,2A DINC @VARA hasn't been reached yet <0286> 6C91 A2,75,60 G6C91 ADD OFFSET,@RKEY Create displayable character <0287> 6C94 BC,B0,61 ST @RKEY,V*ARG5 Display at current character 6C97 75 <0288> * position <0289> 6C98 86,60 CLR @ARG4 Indicate change in line <0290> 6C9A D5,61,5E READ05 DCEQ @ARG2,@ARG5 Hit right margin <0291> 6C9D 4C,AD BR G6CAD <0292> 6C9F 8E,A3,74 CZ V@NOTONE If not the first time <0293> 6CA2 6C,A7 BS G6CA7 <0294> 6CA4 06,00,34 CALL TONE1 ---BEEP--- <0295> 6CA7 BE,A3,74 G6CA7 ST >FF,V@NOTONE Set the flag 6CAA FF <0296> 6CAB 4A,A8 BR READZ1 Stay in current mode !!!! <0297> 6CAD 91,61 G6CAD DINC @ARG5 Update current address <0298> 6CAF D6,B0,61 CEQ EDGECH,V*ARG5 Correct for next line 6CB2 7F <0299> 6CB3 4C,B9 BR G6CB9 <0300> 6CB5 A3,61,00 DADD 4,@ARG5 By skipping border 6CB8 04 <0301> 6CB9 C5,61,2A G6CB9 DCH @VARA,@ARG5 Check for last new high limit <0302> 6CBC 4C,C1 BR G6CC1 <0303> 6CBE BD,2A,61 DST @ARG5,@VARA Update new high limit <0304> 6CC1 CB,2A,02 G6CC1 DCHE >02FE,@VARA Still some space to go 6CC4 FE <0305> 6CC5 4A,A8 BR READZ1 <0306> 6CC7 0F,83 XML SCROLL Scroll the screen!!! <0307> 6CC9 A7,2A,00 DSUB 28,@VARA Back to current start of line 6CCC 1C <0308> 6CCD 8E,64 CZ @ARG8 If not insert mode then <0309> 6CCF 6C,D5 BS G6CD5 <0310> 6CD1 A7,2A,00 DSUB 4,@VARA Off by 4 more-correct it 6CD4 04 <0311> 6CD5 A7,20,00 G6CD5 DSUB 32,@VARW Backup line start address 6CD8 20 <0312> 6CD9 A7,5E,00 DSUB 32,@ARG2 Absolute high limit backs up 6CDC 20 <0313> 6CDD A7,61,00 DSUB 32,@ARG5 Current cursor position too 6CE0 20 <0314> 6CE1 4A,A8 BR READZ1 Start with something else <0315> * <0316> * Something special for forward cursor move <0317> * <0318> 6CE3 86,64 RFORW CLR @ARG8 Leave INSERT mode - don't cop <0319> 6CE5 4C,9A BR READ05 but use rest of input logic <0320> *---------------------------------------------------------- <0321> * RBACK section has been moved from READL2+1 for adding <0322> * auto-repeat function in 99/4A. Also <0323> * BR READ01 is added at the end, 5/18/81 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0035 EDIT-359 <0324> *---------------------------------------------------------- <0325> * This will cause the next test to fail initialy, since <0326> * VARW clearly equals ARG5 first time through <0327> *------------- ADD THE FOLLOWING LINE 6/12/81 ------------- <0328> 6CE7 86,A3,74 RBACK CLR V@NOTONE Reset flag for SIZE in ACCEPT <0329> 6CEA C5,61,20 DCH @VARW,@ARG5 The standard backup entry <0330> 6CED 4C,FB BR G6CFB <0331> 6CEF 93,61 DDEC @ARG5 So we backup the current posi <0332> 6CF1 D6,B0,61 CEQ EDGECH,V*ARG5 Skip border line 6CF4 7F <0333> 6CF5 4C,FB BR G6CFB <0334> 6CF7 A7,61,00 DSUB 4,@ARG5 Backup to previous line 6CFA 04 <0335> 6CFB 4A,A3 G6CFB BR READ01 Go back for next character <0336> *********************************************************** <0337> * WARNZZ - Checks the special warning handling conditions <0338> * which can be set by an ON WARNING statement and does the <0339> * following based upon those conditions: <0340> * ON WARNING PRINT - prints continues execution <0341> * ON WARNING STOP - prints and stops <0342> * ON WARNING NEXT - ignores the warning and goes on <0343> *********************************************************** <0344> 6CFD 87,22 WARNZZ DCLR @ERRCOD Clear the error if form 9900 <0345> 6CFF 86,76 CLR @EXPZ <0346> 6D01 88,77 FETCH @EXPZ+1 Get index into error table <0347> 6D03 E3,76,00 DSLL 2,@EXPZ Multiply by 4 6D06 02 <0348> 6D07 A3,76,CD DADD ERRTAB,@EXPZ Get addres of entry into tabl 6D0A 77 <0349> 6D0B 33,00,04 MOVE 4,G@0(@EXPZ),@FAC10 6D0E 54,00,00 6D11 76 <0350> 6D12 8E,44 CZ @PRGFLG If its imperative <0351> 6D14 6D,1B BS WRNZZ3 take defualt. <0352> 6D16 DA,45,02 CLOG >02,@FLAG If print turned on <0353> 6D19 4D,35 BR G6D35 <0354> 6D1B 0F,83 WRNZZ3 XML SCROLL Scroll the screen <0355> 6D1D 31,00,09 MOVE 9,G@MSGWRN,V@NLNADD * WARNING 6D20 A2,E2,60 6D23 5C <0356> 6D24 0F,83 XML SCROLL Scroll the screen again <0357> 6D26 BF,20,02 DST NLNADD+2,@VARW Start address behind warning 6D29 E4 <0358> 6D2A 06,CE,1F CALL TRACBK Check for warning in UDF <0359> 6D2D 6D,32 BS WRNZZ5 Was UDF so message already ou <0360> 6D2F 06,6E,1B CALL ERPNT5 Print the message <0361> 6D32 BE,7F,03 WRNZZ5 ST 3,@XPT <0362> * If imperative then continue on normally <0363> 6D35 8E,44 G6D35 CZ @PRGFLG If its imperative <0364> 6D37 4D,3C BR G6D3C <0365> 6D39 05,CF,68 B RETNOS <0366> * If warning continue turned on the continue <0367> 6D3C DA,45,04 G6D3C CLOG >04,@FLAG If contiue <0368> 6D3F 4D,44 BR ERRZZ4 <0369> 6D41 05,CF,68 B RETNOS <0370> 6D44 06,76,7F ERRZZ4 CALL CLEAN Clean up stack and s.t. <0371> 6D47 BD,6E,A3 ERRZZ5 DST V@SAVEVP,@VSPTR Restore value stack 6D4A 88 <0372> 6D4B 05,60,12 BTOP15 B G6012 Finish up and go back <0373> *********************************************************** <0374> * ERRZZ - Sets up an error stack entry based upon the <0375> * information passed to it by the caller and what it can <0376> * gather from the error table. It then either prints the <0377> * error message and aborts or goes to the line specified by 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0036 EDIT-359 <0378> * a previously executed ON ERROR statement. The stack enrry <0379> * looks like: <0380> * --------------------------------------------------------- <0381> * | Error code | Severity | >69 | Luno # | EXTRAM | PGMPTR <0382> * | ^ | ^ | ^ | ^ | ^ | ^ <0383> * | FAC | FAC1 | FAC2| FAC3 | FAC4 | FAC6 <0384> *---------------------------------------------------------- <0385> * ERROR CODE - the error number <0386> * SEVERITY - Severity of the error <0387> * 1 - Warning <0388> * 5 - Possibly recoverable <0389> * 9 - Fatal, unrecoverable <0390> * >69 ERROR STACK ENTRY ID <0391> * LUNO # - Luno # if file error or -1 if non-file error <0392> * EXTRAM, PGMPTR - Information to indicate the line # of <0393> * the error <0394> *********************************************************** <0395> *---------------------------------------------------------- <0396> * In order to fix MEMORY FULL error occurring during MERGE <0397> * execution will leave the file open to disk DSR bug, <0398> * following lines should be added, <0399> *??????? ????????????????????? ???????????????? ??????????? <0400> * This note for the reshipment of FLMGR after 6/10/81 <0401> * IOCALL routine are copied from FLMGR here, becuase FLMGR <0402> * is not in the branch table in FLMGR. <0403> *??????? ????????????????????? ???????????????? ??????????? <0404> * ERRZZ DST V@MRGPAB,@PABPTR <0405> * DCZ @PABPTR Error must occur in EDITLN <0406> * routine during MERGEing <0407> * BS HERE <0408> * CALL IOCALL Close all files <0409> * DATA CZCLOS <0410> * HERE ...........program continues <0411> * A statement BR IOCALL needs to be added in FLMGRS, which <0412> * is not going to be reshipped at this time 6/10/81 <0413> * Therefore, the following patch is used <0414> *?????????????????????????????????????????????????????????? <0415> 6D4E C1,04,A3 ERRZZ DEX V@MRGPAB,@PABPTR 6D51 9E <0416> 6D52 8F,04 DCZ @PABPTR Error must occur in EDITLN <0417> * routine during MERGEing <0418> 6D54 6D,74 BS G6D74 <0419> 6D56 35,00,1E MOVE 30,@FAC,V@>03C0 Save FAC area 6D59 A3,C0,4A <0420> 6D5C BD,56,04 DST @PABPTR,@FAC12 Get the PAB pointer in FAC <0421> 6D5F A3,56,00 DADD NLEN,@FAC12 Compute name length entry 6D62 0D <0422> 6D63 BE,E0,04 ST 1,V@4(@PABPTR) * Select name length entry 6D66 04,01 <0423> 6D68 06,00,10 CALL CALDSR Call actual DSR line routine <0424> 6D6B 08 BYTE 8 <0425> 6D6C 35,00,1E MOVE 30,V@>03C0,@FAC 6D6F 4A,A3,C0 <0426> * Ignore the error coming back from DSR <0427> 6D72 87,04 DCLR @PABPTR Clear V@MRGPAB in case <0428> * any kind of I/O operation <0429> * following MERGE <0430> * (Also for the DEX statement) <0431> 6D74 C1,04,A3 G6D74 DEX V@MRGPAB,@PABPTR Get the PABPTR back 6D77 9E <0432> *---------------------------------------------------------- <0433> 6D78 87,22 DCLR @ERRCOD Clear error code if from 9900 <0434> 6D7A A5,14,0E DSUB @CURINC,@CURLIN Just in case in autonum mode <0435> 6D7D D7,3E,08 DCEQ CRNBUF,@SYMTAB If prescanning r.h. 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0037 EDIT-359 6D80 20 <0436> 6D81 4D,87 BR G6D87 of UDF and parameter in <0437> 6D83 BD,3E,A8 DST V@CRNBUF+2,@SYMTAB crunch buffer, fix SYMTAB 6D86 22 <0438> 6D87 86,76 G6D87 CLR @EXPZ Get index into error table <0439> 6D89 88,77 FETCH @EXPZ+1 Get index into error table <0440> 6D8B E3,76,00 DSLL 2,@EXPZ Multiply index by 4 6D8E 02 <0441> 6D8F A3,76,CD DADD ERRTAB,@EXPZ Address of table entry 6D92 77 <0442> 6D93 33,00,04 MOVE 4,G@0(@EXPZ),@FAC10 Get table entry 6D96 54,00,00 6D99 76 <0443> 6D9A BE,73,8A ST RSTK+2,@SUBSTK Init subroutine stack but all <0444> * for GROM return address <0445> 6D9D 8E,57 CZ @FAC13 If message only <0446> 6D9F 4D,AF BR G6DAF <0447> 6DA1 06,6E,0E ERRZZR CALL ERPRNT Display the error message <0448> 6DA4 D7,54,60 DCEQ MSGFST,@FAC10 If * READY * 6DA7 40 <0449> 6DA8 4D,AD BR G6DAD <0450> 6DAA 06,80,12 CALL CLSALL Close all files <0451> 6DAD 4D,44 G6DAD BR ERRZZ4 and clean up <0452> 6DAF 8E,44 G6DAF CZ @PRGFLG If imperative-default <0453> 6DB1 6D,B8 BS ERRZ1 <0454> 6DB3 8F,A3,8A DCZ V@ERRLN If error turned off <0455> 6DB6 4D,BF BR G6DBF <0456> 6DB8 06,CE,1F ERRZ1 CALL TRACBK Check for UDF <0457> 6DBB 6D,44 BS ERRZZ4 Was UDF, message already out <0458> 6DBD 4D,A1 BR ERRZZR Assume normal error <0459> * <0460> * Error turned on. Now build the error entry <0461> * <0462> 6DBF 06,76,7F G6DBF CALL CLEAN Clean up the stack <0463> 6DC2 BD,4A,56 DST @FAC12,@FAC Put in error & severity <0464> 6DC5 BE,4C,69 ST >69,@FAC2 Error stack ID <0465> 6DC8 D7,54,62 DCEQ MSG130,@FAC10 If I/O error 6DCB A6 <0466> 6DCC 4D,D6 BR G6DD6 <0467> 6DCE BC,4D,E0 ST V@2(@PABPTR),@FAC3 * Put in LUNO # 6DD1 02,04 <0468> 6DD3 B6,4B,80 OR >80,@FAC1 And indicate an I/O error <0469> 6DD6 BD,50,2E G6DD6 DST @EXTRAM,@FAC6 Save line pointer <0470> 6DD9 BD,4E,1E DST @SMTSRT,@FAC4 Save pointer to beginning of <0471> * statement <0472> 6DDC BD,5C,6E DST @VSPTR,@ARG Must check for room on stack <0473> 6DDF A3,5C,00 DADD 24,@ARG Need 24 to help out VPUSH 6DE2 18 <0474> 6DE3 C5,1A,5C DCH @ARG,@STREND If not room <0475> 6DE6 6D,FD BS G6DFD <0476> 6DE8 06,6E,0E CALL ERPRNT Put out the message anyway <0477> 6DEB BF,54,61 DST MSG39,@FAC10 Memory full message 6DEE 1C <0478> 6DEF 86,44 CLR @PRGFLG Don't print a line # <0479> 6DF1 06,6E,0E CALL ERPRNT Print it too <0480> 6DF4 31,00,08 MOVE 8,G@MSGERR,V@NLNADD-18 6DF7 A2,D0,60 6DFA 38 <0481> 6DFB 4D,47 BR ERRZZ5 And give up <0482> 6DFD 0F,77 G6DFD XML VPUSH Push the error entry <0483> 6DFF 87,2E DCLR @EXTRAM Clear on-error entry <0484> 6E01 C1,2E,A3 DEX V@ERRLN,@EXTRAM Set line pointer & clear on-e 6E04 8A <0485> 6E05 06,80,2C CALL GRSUB2 Read the line text pointer VD 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0038 EDIT-359 <0486> * ERAM (use GREAD1) or VDP <0487> 6E08 2E BYTE EXTRAM * @EXTRAM : Source address <0488> * in ERAM/VDP <0489> 6E09 BD,2C,58 DST @EEE1,@PGMPTR Put the result in @PGMPTR <0490> 6E0C 0F,81 XML CONTIN And go to the line [0010] *********************************************************** [0011] COPY 'DSK5.MYXB3-E' <0001> *********************************************************** <0002> * ERPRNT - Print an error or warning message <0003> * <0004> * ERPRNT - Entry point for ERROR <0005> * ERPNT5 - Entry point for WARNING <0006> *********************************************************** <0007> 6E0E 06,60,1C ERPRNT CALL G601C Load the character table <0008> 6E11 0F,83 XML SCROLL Scroll the screen <0009> 6E13 BE,A2,E2 ST >2A+OFFSET,V@NLNADD Put the * in 6E16 8A <0010> 6E17 BF,20,02 DST NLNADD+2,@VARW Set up for the message 6E1A E4 <0011> 6E1B 86,74 ERPNT5 CLR @KEYBD Enable main console <0012> 6E1D 33,00,01 MOVE 1,G@0(@FAC10),@ARG1 Get message length 6E20 5D,00,00 6E23 54 <0013> 6E24 86,5C CLR @ARG <0014> 6E26 32,5C,B0 MOVE @ARG,G@1(@FAC10),V*VARW Display 6E29 20,00,01 6E2C 54 <0015> 6E2D A1,20,5C DADD @ARG,@VARW Start location for " IN " <0016> 6E30 D7,54,62 DCEQ MSG130,@FAC10 "* I/O ERROR [xx]xy" 6E33 A6 <0017> 6E34 4E,4D BR G6E4D <0018> 6E36 91,20 DINC @VARW Update for one space <0019> * separation <0020> 6E38 BC,5F,E0 ST V@>04(@PABPTR),@ARG3 * Create high order resu 6E3B 04,04 <0021> 6E3D 86,5E CLR @ARG2 Only display high order decim <0022> 6E3F 06,6F,BA CALL DISO Display this number <0023> 6E42 BC,5F,E0 ST V@>05(@PABPTR),@ARG3 * Get low order result 6E45 05,04 <0024> 6E47 E6,5F,05 SRL 5,@ARG3 Remove mose identification bi <0025> 6E4A 06,6F,BA CALL DISO Output the number in decimal <0026> 6E4D D7,54,60 G6E4D DCEQ MSGFST,@FAC10 6E50 40 <0027> 6E51 6E,79 BS G6E79 <0028> 6E53 06,00,36 CALL TONE2 Wake up the idiot!!!! <0029> 6E56 8E,44 CZ @PRGFLG If program, print line # <0030> 6E58 6E,79 BS G6E79 <0031> 6E5A C7,20,02 DCH >02F6,@VARW It will pass EOL 6E5D F6 <0032> 6E5E 4E,66 BR G6E66 <0033> 6E60 0F,83 XML SCROLL Display on next line <0034> 6E62 BF,20,02 DST NLNADD+1,@VARW Indent for the "IN" 6E65 E3 <0035> 6E66 BF,E0,01 G6E66 DST >C9CE,V@1(@VARW) * Put in the "in" 6E69 20,C9,CE <0036> 6E6C A3,20,00 DADD 4,@VARW Display location for line 6E6F 04 <0037> 6E70 BC,76,42 ST @CHAT,@EXPZ ASC destroys CHAT <0038> 6E73 06,A0,0A CALL ASC DISPLAY THE LINE # <0039> 6E76 BC,42,76 ST @EXPZ,@CHAT Restore CHAT <0040> 6E79 0F,83 G6E79 XML SCROLL <0041> 6E7B 00 RTN <0042> *********************************************************** <0043> * LLIST - Lists one program line on the screen. The 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0039 EDIT-359 <0044> * entrypoint to the line is given in STPT. <0045> * In this routine, FAC2 is used as a flag to indicate that <0046> * the most recent character output was an alphanumeric <0047> * character. If the next character is also an alphanumeric <0048> * character, then the two are separated by a space. <0049> *********************************************************** <0050> 6E7C DA,45,80 LLIST CLOG >80,@FLAG If program protected <0051> 6E7F 6E,85 BS G6E85 <0052> 6E81 06,6D,4E CALL ERRZZ * PROTECTION VIOLATION <0053> 6E84 27 BYTE 39 <0054> 6E85 06,80,1A G6E85 CALL OUTREC Make room for a new line <0055> 6E88 BD,5E,B0 DST V*EXTRAM,@ARG2 Prepare for line # printing 6E8B 2E <0056> 6E8C B2,5E,7F AND >7F,@ARG2 Reset possible BreakPoint <0057> 6E8F 06,6F,A9 CALL OUTLN Diplay line in free format <0058> 6E92 BD,20,08 DST @CCPADD,@VARW Copy position for editing <0059> 6E95 91,20 DINC @VARW Leave room for space <0060> 6E97 BD,2C,E0 DST V@2(@EXTRAM),@PGMPTR * Get pointer to line 6E9A 02,2E <0061> 6E9C BF,4C,00 LLISZ0 DST >0020,@FAC2 Clear blank fill and set spac 6E9F 20 <0062> 6EA0 0F,79 LLIZ12 XML PGMCHR Get next token on line <0063> 6EA2 8E,42 CZ @CHAT Exit on end of line <0064> 6EA4 6F,A8 BS LLISZ9 <0065> 6EA6 8E,4D CZ @FAC3 If separator needed <0066> 6EA8 6E,B3 BS LLIZ15 <0067> 6EAA C0,4D,42 EX @CHAT,@FAC3 Save CHAT and bare the separa <0068> 6EAD 06,6F,D2 CALL DSPCHR Put the separator out <0069> 6EB0 C0,4D,42 EX @CHAT,@FAC3 Restore CHAT <0070> * Next thing to determine is whether or not we need a space <0071> * for separation with the next stuff. <0072> 6EB3 86,4D LLIZ15 CLR @FAC3 Assume we'll get alphanumeric <0073> 6EB5 D6,42,82 CEQ SSEPZ,@CHAT If double-colon <0074> 6EB8 6E,BF BS LLIZ16 <0075> 6EBA D6,42,B5 CEQ COLONZ,@CHAT If colon now and colon <0076> 6EBD 4E,C4 BR G6EC4 <0077> 6EBF D6,4A,B5 LLIZ16 CEQ COLONZ,@FAC before-separater <0078> 6EC2 6E,E4 BS LLIZ17 <0079> 6EC4 CA,42,B3 G6EC4 CHE COMMAZ,@CHAT Figure out separator range <0080> 6EC7 4E,CE BR G6ECE <0081> 6EC9 CA,42,BA CHE ORZ,@CHAT <0082> 6ECC 4E,F0 BR LLISZ2 <0083> 6ECE C6,42,BD G6ECE CH NOTZ,@CHAT Figure out separator range <0084> 6ED1 4E,D8 BR G6ED8 <0085> 6ED3 CA,42,C8 CHE NUMCOZ,@CHAT <0086> 6ED6 4E,F0 BR LLISZ2 <0087> 6ED8 BE,4D,20 G6ED8 ST >20,@FAC3 Prepare for alfa indication <0088> 6EDB 8E,4C CZ @FAC2 alfanum-alfanum combination <0089> 6EDD 6E,F0 BS LLISZ2 <0090> 6EDF D6,54,20 CEQ >20,@FAC10 Don't ouput 2 spaces <0091> 6EE2 6E,F0 BS LLISZ2 <0092> 6EE4 BC,4C,42 LLIZ17 ST @CHAT,@FAC2 Save CHAT somewhere <0093> 6EE7 BE,42,20 ST >20,@CHAT And display a space <0094> 6EEA 06,6F,D2 CALL DSPCHR <0095> 6EED BC,42,4C ST @FAC2,@CHAT Retrive CHAT <0096> 6EF0 C0,4C,4D LLISZ2 EX @FAC3,@FAC2 Could be for the next time to <0097> * That takes care of all the extra spaces we might need <0098> 6EF3 DA,42,80 CLOG >80,@CHAT Just copy variable names <0099> 6EF6 4F,0A BR G6F0A <0100> 6EF8 06,6F,D2 G6EF8 CALL DSPCHR Copy the character to output <0101> 6EFB 0F,79 XML PGMCHR Get the next character <0102> 6EFD 8E,42 CZ @CHAT But exit on EOL <0103> 6EFF 6F,A8 BS LLISZ9 <0104> 6F01 DA,42,80 CLOG >80,@CHAT 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0040 EDIT-359 <0105> 6F04 6E,F8 BS G6EF8 <0106> 6F06 86,4A CLR @FAC No spaces if ":" or "::" <0107> 6F08 4E,B3 BR LLIZ15 <0108> 6F0A D6,42,C8 G6F0A CEQ NUMZ,@CHAT <0109> 6F0D 6F,17 BS G6F17 <0110> 6F0F D6,42,C7 CEQ STRINZ,@CHAT <0111> 6F12 4F,41 BR LLISZ3 <0112> 6F14 06,6F,CF CALL DSPQUO Display first quote of string <0113> * This place is the general location for strings both quote <0114> * unquoted. <0115> 6F17 0F,79 G6F17 XML PGMCHR Get string length in CHAT <0116> 6F19 BC,4A,42 ST @CHAT,@FAC Copy in temporary space <0117> 6F1C 8E,4A G6F1C CZ @FAC Also take care of empty strin <0118> 6F1E 6F,35 BS G6F35 <0119> 6F20 0F,79 XML PGMCHR <0120> 6F22 8E,4C CZ @FAC2 Alpha means unquoted string <0121> 6F24 4F,2E BR G6F2E <0122> 6F26 D6,42,22 CEQ QUOTE,@CHAT <0123> 6F29 4F,2E BR G6F2E <0124> 6F2B 06,6F,D2 CALL DSPCHR Display two quotes for one <0125> 6F2E 06,6F,D2 G6F2E CALL DSPCHR Display 2nd quote or char <0126> 6F31 92,4A DEC @FAC Update string length, get nex <0127> 6F33 4F,1C BR G6F1C <0128> 6F35 8E,4C G6F35 CZ @FAC2 <0129> 6F37 4F,87 BR LLISZ1 Non-alfa end means extra <0130> 6F39 06,6F,CF CALL DSPQUO Display closing quote <0131> 6F3C BE,4C,20 ST >20,@FAC2 Cause space before following <0132> 6F3F 4F,87 BR LLISZ1 alpha <0133> * Try to decode line numbers and keywords <0134> 6F41 D6,42,C9 LLISZ3 CEQ LNZ,@CHAT Decode line # <0135> 6F44 4F,55 BR G6F55 <0136> 6F46 0F,79 XML PGMCHR Get the high order byte first <0137> 6F48 BC,5E,42 ST @CHAT,@ARG2 <0138> 6F4B 0F,79 XML PGMCHR <0139> 6F4D BC,5F,42 ST @CHAT,@ARG3 information as collected her <0140> 6F50 06,6F,A9 CALL OUTLN Display the actual informatio <0141> 6F53 4F,87 BR LLISZ1 And continue <0142> * Now it has to be a normal keyword <0143> 6F55 BF,4A,CB G6F55 DST KEYTAB,@FAC Address of KEYTAB for search 6F58 00 <0144> 6F59 0F,84 XML IO Search keyword table <0145> 6F5B 00 BYTE 0 * Select table search <0146> * FAC8 returns with pointer to keyword <0147> * FAC4 has length <0148> 6F5C 33,00,01 LLISZ6 MOVE 1,G@0(@FAC8),@CHAT 6F5F 42,00,00 6F62 52 <0149> * And output the thus found character <0150> 6F63 06,6F,D2 CALL DSPCHR Display character on screen <0151> 6F66 91,52 DINC @FAC8 Update FAC8 for next referenc <0152> 6F68 92,4F DEC @FAC5 Count number of characters <0153> 6F6A 4F,5C BR LLISZ6 Always less then 255 <0154> 6F6C D6,4A,83 CEQ TREMZ,@FAC No spaces after!!! <0155> 6F6F 6F,85 BS LLISZ7 <0156> 6F71 D6,4A,9A CEQ REMZ,@FAC No spaces after REM <0157> 6F74 6F,85 BS LLISZ7 <0158> 6F76 CA,4A,B3 CHE COMMAZ,@FAC Master stuff =>space <0159> 6F79 4E,9C BR LLISZ0 <0160> 6F7B D6,4A,ED CEQ USINGZ,@FAC Master stuff =>space <0161> 6F7E 6E,9C BS LLISZ0 <0162> 6F80 D6,4A,FD CEQ NUMBEZ,@FAC "#" never followed by space <0163> 6F83 4F,87 BR LLISZ1 <0164> 6F85 86,4C LLISZ7 CLR @FAC2 Avoid spaces behind here <0165> 6F87 86,4D LLISZ1 CLR @FAC3 Indicate separator not needed 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0041 EDIT-359 <0166> 6F89 4E,A0 BR LLIZ12 Continue for next keyword <0167> *********************************************************** <0168> * Convert a number from binary to ASCII <0169> * Input : binary number in ARG2 and ARG3 <0170> * Output : pointer to ASCII number in FAC11 with the actual <0171> * number lying just before and ending with FAC10. <0172> * i.e. the last digit of the ASCII representation <0173> * is in FAC10; number of digits in the number in <0174> * ARG5 <0175> *********************************************************** <0176> 6F8B 86,61 CVRTLN CLR @ARG5 Start with 0 characters <0177> 6F8D BE,67,67 ST ARG11,@ARG11 Select first address + 1 <0178> 6F90 87,5C G6F90 DCLR @ARG Clear upper 2 bytes of 4 byte <0179> 6F92 92,67 DEC @ARG11 Go to next position <0180> 6F94 AF,5C,00 DDIV 10,@ARG Compute least significant rem 6F97 0A <0181> 6F98 A2,5F,30 ADD >30,@ARG3 Always < 10 off course <0182> 6F9B BC,90,67 ST @ARG3,*ARG11 Store it in ARG 6F9E 5F <0183> 6F9F BD,5E,5C DST @ARG,@ARG2 Replace remainder by result <0184> 6FA2 90,61 INC @ARG5 Update total # of characters <0185> 6FA4 8F,5E DCZ @ARG2 Until whole number converted <0186> 6FA6 4F,90 BR G6F90 <0187> 6FA8 00 LLISZ9 RTN <0188> * Output a line number to a device (or screen) <0189> 6FA9 06,6F,8B OUTLN CALL CVRTLN Convert from binary to ASCII <0190> 6FAC BC,42,90 OUTLZ1 ST *ARG11,@CHAT Get the next character 6FAF 67 <0191> 6FB0 06,6F,D2 CALL DSPCHR Display the character <0192> 6FB3 90,67 INC @ARG11 Increment the character posit <0193> 6FB5 92,61 DEC @ARG5 Decrement number of digits <0194> 6FB7 4F,AC BR OUTLZ1 Output digit if not all out <0195> 6FB9 00 RTN <0196> * Display number on the screen <0197> 6FBA 06,6F,8B DISO CALL CVRTLN Convert from binary to ASCII <0198> 6FBD BC,B0,20 DISPZ1 ST *ARG11,V*VARW Get more significant characte 6FC0 90,67 <0199> 6FC2 A2,B0,20 ADD OFFSET,V*VARW Display character on screen 6FC5 60 <0200> 6FC6 91,20 DINC @VARW Update screen pointer <0201> 6FC8 90,67 INC @ARG11 Get next position <0202> 6FCA 92,61 DEC @ARG5 Update count <0203> 6FCC 4F,BD BR DISPZ1 Add loop until finished <0204> 6FCE 00 RTN <0205> * Put out a quote <0206> 6FCF BE,42,22 DSPQUO ST QUOTE,@CHAT DISPLAY A QUOTE <0207> * Put out next character <0208> 6FD2 C4,06,07 DSPCHR CH @RECLEN,@CCPPTR Action on end of screen <0209> 6FD5 4F,DE BR G6FDE <0210> 6FD7 06,80,1A CALL OUTREC Output crrrent record <0211> 6FDA A7,20,00 DSUB 32,@VARW Keep track of begining of lin 6FDD 20 <0212> 6FDE BC,B0,08 G6FDE ST @DSRFLG,V*CCPADD Put offset on screen 6FE1 17 <0213> 6FE2 A0,B0,08 ADD @CHAT,V*CCPADD Add in the character 6FE5 42 <0214> 6FE6 91,08 DINC @CCPADD Bump output pointer <0215> 6FE8 90,06 INC @CCPPTR Update current line positon <0216> 6FEA BC,54,42 ST @CHAT,@FAC10 FAC10 may be used by OUTREC ! <0217> 6FED 00 RTN <0218> *********************************************************** <0219> * Static scanner to build the main symbol table and to buil <0220> * symbol tables for each subprogram and to build the <0221> * subprogram table. Checks some errors and aborts if any 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0042 EDIT-359 <0222> * detected. <0223> *********************************************************** <0224> *---------------------------------------------------------- <0225> * Added the following 6/8/81 for NOPSCAN feature <0226> * Flag PSCFG: >00 NOPSCAN <0227> * >FF RESUME PSCAN <0228> 6FEE BE,A3,B7 PRESCN ST >FF,V@PSCFG Default to PSCAN 6FF1 FF <0229> *---------------------------------------------------------- <0230> 6FF2 87,0A DCLR @CALIST Initialize call list <0231> 6FF4 BF,06,00 DST 10,@DFLTLM Set default array size 6FF7 0A <0232> 6FF8 87,16 DCLR @XFLAG Initialize prescan flag bits <0233> * and FOR/NEXT counter <0234> 6FFA 8E,44 CZ @PRGFLG If imperative <0235> 6FFC 50,0B BR G700B <0236> 6FFE BF,2C,08 DST CRNBUF,@PGMPTR Pointer to 1st token 7001 20 <0237> 7002 0F,79 XML PGMCHR Get the 1st token <0238> 7004 0F,83 XML SCROLL Scroll the screen <0239> 7006 06,70,4B CALL SCAN10 Do the static scan of the lin <0240> 7009 50,13 BR G7013 If program <0241> 700B 06,70,1A G700B CALL SCAN Scan the program <0242> 700E B2,45,90 AND >90,@FLAG Reset all the flags but the <0243> * TRACE & LIST/EDIT protection <0244> 7011 87,48 DCLR @LSUBP <0245> 7013 BD,6E,A3 G7013 DST V@SAVEVP,@VSPTR Initialize VSPTR 7016 88 <0246> 7017 05,A0,04 B EXEC Execute the program or statem <0247> *********************************************************** <0248> * Static Scanner <0249> *********************************************************** <0250> 701A BD,2E,32 SCAN DST @ENLN,@EXTRAM 1st address of line # table <0251> 701D A3,2E,00 DADD 3,@EXTRAM 7020 03 <0252> 7021 87,3E DCLR @SYMTAB Clear the symbol table <0253> 7023 87,3A DCLR @SUBTAB Clear the subprogram table <0254> 7025 8E,80,84 CZ @RAMTOP <0255> 7028 50,31 BR G7031 <0256> 702A BD,40,30 DST @STLN,@FREPTR Initialize free-space pointer <0257> 702D 93,40 DDEC @FREPTR Back up from line # table <0258> 702F 50,3B BR G703B <0259> 7031 BD,80,86 G7031 DST @STLN,@RAMFRE Initialize ERAM free-space 7034 30 <0260> 7035 93,80,86 DDEC @RAMFRE pointer <0261> 7038 BD,40,70 DST @>8370,@FREPTR Initialize with no pgm in VDP <0262> 703B 86,43 G703B CLR @BASE OPTION BASE = 0 <0263> 703D BD,18,40 DST @FREPTR,@STRSP Initailize string space <0264> 7040 BD,1A,18 DST @STRSP,@STREND <0265> 7043 BD,12,30 DST @STLN,@LINUM <0266> 7046 95,12 DINCT @LINUM Point to last line in program <0267> * THE FOLLOWING 20 STATEMENTS CANNOT BE SEPARATED OR THE <0268> * ASSEMBLY LANGUAGE CODE WILL NOT WORK - SRH <0269> 7048 0F,8F XML SCNSMT Scan the program <0270> 704A 00 BYTE 0 * Entire program flag <0271> 704B 0F,8F SCAN10 XML SCNSMT Scan the statement <0272> 704D 02 BYTE 2 * Single statement flag <0273> 704E 51,6A BR SCANRT Normal end of scan <0274> 7050 50,AD BR SCNDEF Scan a def <0275> 7052 50,6E BR SCNDIM Scan a dim <0276> 7054 51,6B BR CALLS Scan a call <0277> 7056 50,7D BR SCNOPT Scan an option base <0278> 7058 51,C2 BR SUBS Scan a sub <0279> 705A 52,D5 BR SUBNDS Scan a subexit 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0043 EDIT-359 <0280> 705C 52,D5 BR SUBNDS Scan a subend <0281> 705E 51,39 BR CALENT Call ENTER <0282> 7060 51,4B BR ERROLP * ONLY LEGAL IN A PROGRAM <0283> 7062 56,67 BR ERRNWF * NEXT WITHOUT FOR <0284> 7064 56,6B BR ERRFNN * FOR/NEXT NESTING <0285> 7066 56,73 BR ERRMS * MISSING SUBEND <0286> 7068 51,56 BR ERRSYX * SYNTAX ERROR <0287> 706A 56,63 BR ERRMEM * MEMORY FULL <0288> 706C 56,53 BR ERRIBS * ILLEGAL AFTER SUBPROGRAM <0289> * <0290> * SPECIALLY SCANNED STATEMENTS <0291> * DIM STATEMENT <0292> 706E DA,16,40 SCNDIM CLOG >40,@XFLAG <0293> 7071 51,56 BR ERRSYX <0294> 7073 06,72,FD G7073 CALL ENTER Declare this symbol <0295> 7076 D6,42,B3 CEQ COMMAZ,@CHAT Loop if more <0296> 7079 70,73 BS G7073 <0297> 707B 50,A6 BR SCAN25 Must have EOL now <0298> * OPTION BASE STATEMENT <0299> 707D 06,71,42 SCNOPT CALL IMPIF Can't be imperative or in "IF <0300> 7080 06,76,40 CALL PGMERR OPTION - therefore must be BA <0301> 7083 DA,16,02 CLOG >02,@XFLAG <0302> 7086 56,5B BR ERROBE <0303> * Error if OPTFLG already set <0304> 7088 06,71,4F CALL CHKSYN Must have a "BASE" <0305> 708B F1 BYTE BASEZ <0306> 708C 06,71,4F CALL CHKSYN Must have a numeric constant <0307> 708F C8 BYTE NUMCOZ <0308> 7090 06,71,4F CALL CHKSYN Must have 1-char numeric cons <0309> 7093 01 BYTE 1 <0310> 7094 86,43 CLR @BASE Assume BASE=0 <0311> 7096 A6,42,30 SUB >30,@CHAT Must be 0 or 1 <0312> 7099 70,A1 BS SCAN20 OK if 0 <0313> 709B 92,42 DEC @CHAT Check for a 1 <0314> 709D 56,5B BR ERROBE If it was not a 1 then ERROR <0315> 709F 90,43 INC @BASE Set OPTION BASE=1 <0316> 70A1 B6,16,02 SCAN20 OR >02,@XFLAG Set the option base flag <0317> 70A4 0F,79 SCAN22 XML PGMCHR Now - check for end-of-line <0318> 70A6 06,71,5A SCAN25 CALL CHKEND If not EOL or :: or ! -err <0319> 70A9 71,3F BS CONSCN If EOS - continue scan <0320> 70AB 51,56 BR ERRSYX * SYNTAX ERROR <0321> * DEF STATEMENT <0322> 70AD 06,71,42 SCNDEF CALL IMPIF Can't be imperative or in "IF <0323> 70B0 B6,16,84 OR >84,@XFLAG Set function bit <0324> * Set ENTERX bit <0325> 70B3 06,72,FD CALL ENTER Enter the function name <0326> * ENTER resets function bit <0327> 70B6 DA,B0,3E CLOG >07,V*SYMTAB Did function have parm? 70B9 07 <0328> 70BA 71,33 BS SCAN55 No... <0329> 70BC B6,16,80 OR >80,@XFLAG >80 call for parm enter <0330> 70BF B6,45,08 OR >08,@FLAG Fake it so symbol table <0331> * searches won't be made <0332> 70C2 06,73,00 CALL ENTERW Enter the parameter <0333> 70C5 B2,45,F7 AND >F7,@FLAG Reset function bit <0334> 70C8 06,71,4F CALL CHKSYN Complex symbol must be <0335> 70CB B6 BYTE RPARZ * followed by ")=" <0336> 70CC 06,71,4F CALL CHKSYN <0337> 70CF BE BYTE EQUALZ <0338> 70D0 35,00,1D MOVE 29,V*SYMTAB,V@CRNBUF 70D3 A8,20,B0 70D6 3E <0339> 70D7 BD,00,A8 DST V@CRNBUF+4,@VAR0 Get pointer to name 70DA 24 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0044 EDIT-359 <0340> 70DB 8E,80,84 CZ @RAMTOP If ERAM program <0341> 70DE 70,EB BS G70EB <0342> * If ERAM must fix up the name pointer because the name was <0343> * moved too <0344> 70E0 A5,00,3E DSUB @SYMTAB,@VAR0 Offset into entry <0345> 70E3 A3,00,08 DADD CRNBUF,@VAR0 New location of name 70E6 20 <0346> 70E7 BD,A8,24 DST @VAR0,V@CRNBUF+4 Put it in 70EA 00 <0347> 70EB BD,40,E0 G70EB DST V@2(@SYMTAB),@FREPTR * Reset free space pointe 70EE 02,3E <0348> 70F0 BF,3E,08 DST CRNBUF,@SYMTAB Point into crunch buffer 70F3 20 <0349> 70F4 93,40 DDEC @FREPTR <0350> 70F6 06,71,5A SCAN35 CALL CHKEND If EOL or ! or :: <0351> 70F9 71,2D BS SCAN50 Yes <0352> 70FB CE,42,00 CGT >00,@CHAT <0353> 70FE 71,11 BS SCAN40 <0354> 7100 D6,42,C8 CEQ NUMZ,@CHAT If numeric - skip it <0355> 7103 71,0A BS SCAN45 <0356> 7105 D6,42,C7 CEQ STRINZ,@CHAT If string - skip <0357> 7108 51,0D BR G710D <0358> 710A 06,76,48 SCAN45 CALL SKPSTR Skip the string or numeric <0359> 710D 0F,79 G710D XML PGMCHR Get next charater <0360> 710F 50,F6 BR SCAN35 <0361> * Jump always <0362> 7111 B6,16,80 SCAN40 OR >80,@XFLAG Make an ENTERX (>80)call <0363> 7114 06,73,05 CALL ENTERX Enter the symbol <0364> **** Relink to keep parameter at the beginning of the table <0365> 7117 D7,3E,08 DCEQ CRNBUF,@SYMTAB If no entry 711A 20 <0366> 711B 70,F6 BS SCAN35 <0367> 711D BD,E0,02 DST V@CRNBUF+2,V@2(@SYMTAB) * Put link in 7120 3E,A8,22 <0368> 7123 BD,A8,22 DST @SYMTAB,V@CRNBUF+2 Put new pointer in 7126 3E <0369> 7127 BF,3E,08 DST CRNBUF,@SYMTAB Put new pointer in 712A 20 <0370> 712B 50,F6 BR SCAN35 Go on <0371> * Jump always <0372> 712D BD,3E,A8 SCAN50 DST V@CRNBUF+2,@SYMTAB Delink the parameter 7130 22 <0373> 7131 51,3F BR CONSCN Continue the scan <0374> 7133 06,71,4F SCAN55 CALL CHKSYN <0375> 7136 BE BYTE EQUALZ <0376> 7137 51,3F BR CONSCN <0377> 7139 B6,16,80 CALENT OR >80,@XFLAG Set enterx (>80) flag <0378> 713C 06,73,05 CALL ENTERX Enter in symbol table <0379> 713F 0F,8F CONSCN XML SCNSMT Return to 9900 code to resume <0380> 7141 01 BYTE 1 * Return call to 9900 code <0381> 7142 DA,16,40 IMPIF CLOG >40,@XFLAG Not in if <0382> 7145 51,56 BR ERRSYX <0383> 7147 8E,44 IMPILL CZ @PRGFLG Program mode - OK - return <0384> 7149 51,6A BR SCANRT <0385> 714B 06,6D,4E ERROLP CALL ERRZZ If imperative - error <0386> 714E 1B BYTE 27 * Only legal in a program <0387> * Syntax required token routine <0388> 714F 88,4A CHKSYN FETCH @FAC <0389> 7151 D4,42,4A CEQ @FAC,@CHAT <0390> 7154 76,40 BS PGMERR <0391> 7156 06,6D,4E ERRSYX CALL ERRZZ <0392> 7159 03 BYTE 3 * Syntax error <0393> 715A DA,42,80 CHKEND CLOG >80,@CHAT <0394> 715D 71,68 BS G7168 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0045 EDIT-359 <0395> 715F CA,42,84 CHE TREMZ+1,@CHAT <0396> 7162 71,68 BS G7168 <0397> 7164 D4,00,00 CEQ @>8300,@>8300 Force COND to "SET" <0398> 7167 01 RTNC <0399> 7168 8E,42 G7168 CZ @CHAT Set COND according to CHAT <0400> 716A 01 SCANRT RTNC <0401> *********************************************************** <0402> * CALLS routine <0403> * This routine scans the CALL statement. Get the subprogram <0404> * name, search the table and update the call list <0405> * (value stack area) if necessary. Share eht same XML <0406> * search routine as the symbol table code uses. <0407> *********************************************************** <0408> 716B 0F,79 CALLS XML PGMCHR Get token after call <0409> 716D 06,71,4F CALL CHKSYN Check subprogram name <0410> 7170 C8 BYTE UNQSTZ * Must start with unquoted stri <0411> 7171 C6,42,0F CH >0F,@CHAT * NAME TOO LONG!! <0412> 7174 76,57 BS NTLERR <0413> 7176 BD,00,2C DST @PGMPTR,@VAR0 Save program pointer to name <0414> 7179 BE,5B,4A ST FAC,@FAC17 Set up a pointer <0415> 717C BC,59,42 ST @CHAT,@FAC15 Save name length <0416> 717F BC,5A,42 ST @CHAT,@FAC16 Save name length as a counter <0417> 7182 0F,79 CALL20 XML PGMCHR Get one byte of name <0418> 7184 BC,90,5B ST @CHAT,*FAC17 Store that character in FAC a 7187 42 <0419> 7188 90,5B INC @FAC17 Increment pointer <0420> 718A 92,5A DEC @FAC16 Decrement conter <0421> 718C 51,82 BR CALL20 Get next character <0422> * Exchange call list address wit <0423> * symbol table address to run th <0424> * same search routine used for <0425> * symbol table search. <0426> 718E C1,0A,3E DEX @SYMTAB,@CALIST <0427> 7191 0F,7D XML SCHSYM Search to see if name there <0428> 7193 C1,3E,0A DEX @CALIST,@SYMTAB Exchange back both addresses <0429> 7196 71,BE BS SCAN67 If name found do nothing <0430> 7198 8E,80,89 CZ @RAMFLG If not imperative and ERAM <0431> 719B 71,AE BS G71AE <0432> 719D 0F,77 XML VPUSH Put first 8 byte of name <0433> 719F BD,00,6E DST @VSPTR,@VAR0 Pointing to new name location <0434> 71A2 CE,59,08 CGT >08,@FAC15 If more characters in name <0435> 71A5 51,AE BR G71AE <0436> 71A7 35,00,08 MOVE 8,@FAC8,@FAC Move rest of the name 71AA 4A,52 <0437> 71AC 0F,77 XML VPUSH Push one more time <0438> 71AE 86,4A G71AE CLR @FAC <0439> 71B0 BC,4B,59 ST @FAC15,@FAC1 Put in name length <0440> 71B3 BD,4C,0A DST @CALIST,@FAC2 Put in call list link <0441> 71B6 BD,4E,00 DST @VAR0,@FAC4 Put in pointer to name <0442> 71B9 0F,77 XML VPUSH Put the entry in the VDP <0443> 71BB BD,0A,6E DST @VSPTR,@CALIST Change pointer to call list <0444> 71BE 0F,79 SCAN67 XML PGMCHR <0445> 71C0 51,3F BR CONSCN <0446> *********************************************************** <0447> * SUBS routine <0448> * This routine scans SUB statement in subprogram. First <0449> * check the subprogram name and call list. Then builds <0450> * subprogram table without argument list, scans symbols in <0451> * the subprogram and create symbol table for the subprogram <0452> * make entry to the subprogram table and add (if necessary) <0453> * to call list. <0454> *********************************************************** <0455> 71C2 06,71,42 SUBS CALL IMPIF Can't be imperative or in "IF <0456> 71C5 8E,17 CZ @FORNET Check FOR-NEXT nesting 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0046 EDIT-359 <0457> 71C7 56,6B BR ERRFNN <0458> 71C9 DA,16,01 CLOG >01,@XFLAG Called first time <0459> 71CC 51,D7 BR G71D7 <0460> 71CE DA,16,08 CLOG >08,@XFLAG <0461> 71D1 56,73 BR ERRMS <0462> * Cannot be in subprogram. Can't start another one. <0463> 71D3 BD,A3,92 DST @SYMTAB,V@TABSAV Finish off main table 71D6 3E <0464> * From the second SUB statement <0465> 71D7 87,3E G71D7 DCLR @SYMTAB Start with empty symbol table <0466> 71D9 B6,16,28 OR >28,@XFLAG Set flag for SAFLG and SUBFLG <0467> 71DC B2,16,FE AND >FE,@XFLAG Reset REMODE flag <0468> 71DF 0F,79 XML PGMCHR Get name behind SUB statement <0469> 71E1 06,71,4F CALL CHKSYN Make sure it's unquoted strin <0470> 71E4 C8 BYTE UNQSTZ <0471> 71E5 C6,42,0F CH >0F,@CHAT Length must be <= 15 <0472> 71E8 76,57 BS NTLERR <0473> 71EA BC,4B,42 ST @CHAT,@FAC1 Save name length <0474> 71ED BD,4E,2C DST @PGMPTR,@FAC4 Assume pointer to VDP name <0475> 71F0 8E,80,84 CZ @RAMTOP But if ERAM save name in tabl <0476> 71F3 72,0E BS G720E <0477> 71F5 86,4A CLR @FAC <0478> 71F7 0F,72 XML MEMCHK FAC already has name length <0479> 71F9 76,63 BS ERRMEM * MEMORY FULL <0480> 71FB A5,40,4A DSUB @FAC,@FREPTR Get pointer to put name in <0481> 71FE BD,58,40 DST @FREPTR,@EEE1 Re-do pointer to name <0482> 7201 91,58 DINC @EEE1 Correct for one off <0483> 7203 BD,56,4A DST @FAC,@FFF1 Set for XML GVWITE <0484> 7206 BD,54,2C DST @PGMPTR,@DDD1 Set for XML GVWITE <0485> 7209 0F,8B XML GVWITE Move @FFF1 bytes from ERAM at <0486> * DDD1 to VDP at EEE1 <0487> * <0488> * Start building the subprogram table <0489> 720B BD,4E,58 DST @EEE1,@FAC4 Put pointer in VRAM to name <0490> 720E BF,4A,00 G720E DST 14,@FAC Minimum table size for subpro 7211 0E <0491> 7212 0F,72 XML MEMCHK Make sure enough room there <0492> 7214 76,63 BS ERRMEM * MEMORY FULL <0493> 7216 86,4A CLR @FAC Prepare for name length <0494> 7218 BC,4B,42 ST @CHAT,@FAC1 Get the name length <0495> 721B BD,4C,3A DST @SUBTAB,@FAC2 Save subprogram table address <0496> 721E 87,50 DCLR @FAC6 Mark end of argumant list <0497> * @FAC = name length @FAC2 = subprogram table lin <0498> * @FAC4 = pointer to name @FAC6 = argument list = 00 <0499> * @FAD8 = @PGMPTR @FAC10 = @EXTRAM <0500> * @FAC12 = symbol table = 00 <0501> 7220 A1,2C,4A DADD @FAC,@PGMPTR Skip the name to look ahead <0502> 7223 35,00,04 MOVE 4,@PGMPTR,@FAC8 Copy PGMPTR and EXTRAM 7226 52,2C <0503> 7228 87,56 DCLR @FAC12 Assume subpgm has no symbol t <0504> 722A A7,40,00 DSUB 14,@FREPTR Reset free pointer 722D 0E <0505> 722E BD,3A,40 DST @FREPTR,@SUBTAB Copy <0506> 7231 91,3A DINC @SUBTAB Set new subtable pointer <0507> 7233 35,00,0E MOVE 14,@FAC,V*SUBTAB Put the table in!! 7236 B0,3A,4A <0508> * Start fixing up subprogram's symbol table <0509> 7239 BD,A3,9A DST @SUBTAB,V@SSTEMP Copy address of subtable 723C 3A <0510> 723D A3,A3,9A DADD 6,V@SSTEMP Point to argument list 7240 00,06 <0511> 7242 BD,A3,9C DST V@SSTEMP,V@SSTMP2 Duplicate for later use 7245 A3,9A <0512> 7247 0F,79 XML PGMCHR Get next token 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0047 EDIT-359 <0513> 7249 06,71,5A CALL CHKEND Check if end of statement <0514> 724C 72,CB BS SCAN90 Yes. Get out here quick <0515> * Start looking at aruguments. <0516> 724E 06,71,4F CALL CHKSYN Check for left parenthesis <0517> 7251 B7 BYTE LPARZ <0518> 7252 B6,16,80 SCAN86 OR >80,@XFLAG Flag for ENTXFL <0519> 7255 06,73,05 CALL ENTERX Enter next parameter <0520> 7258 BF,4A,00 DST 2,@FAC Get room for ptr in sub block 725B 02 <0521> 725C 0F,72 XML MEMCHK See if we had space for 2 byt <0522> 725E 76,63 BS ERRMEM * MEMORY FULL <0523> 7260 BD,4A,A3 DST V@SSTEMP,@FAC Copy current arg list pointer 7263 9A <0524> 7264 A5,4A,3E DSUB @SYMTAB,@FAC Find length from table addres <0525> * Move symbol table down two byt <0526> * to make space for next argueme <0527> FFFE MINUST EQU -2 <0528> 7267 34,4A,EF MOVE @FAC,V*SYMTAB,V@MINUST(@SYMTAB) 726A FF,FE,3E 726D B0,3E <0529> 726F 97,3A DDECT @SUBTAB Adjust the subtable pointer <0530> 7271 97,A3,9C DDECT V@SSTMP2 Adjust to point to first argu <0531> 7274 BD,00,A3 DST V@SSTEMP,@VAR0 7277 9A <0532> 7278 BD,EF,FF DST @SYMTAB,V@MINUST(@VAR0) Put pointer in subtab 727B FE,00,3E <0533> 727E BD,4A,3E DST @SYMTAB,@FAC Copy symbol table address <0534> 7281 97,4A DDECT @FAC Pointing to real s.t. address <0535> 7283 BD,4C,E0 SCAN88 DST V@4(@FAC),@FAC2 Copy pointer to symbol table 7286 04,4A <0536> 7288 93,4C DDEC @FAC2 <0537> 728A C5,4C,3A DCH @SUBTAB,@FAC2 If name moved also <0538> 728D 72,93 BS G7293 <0539> 728F 97,E0,04 DDECT V@4(@FAC) correct for the movement. 7292 4A <0540> 7293 8F,E0,02 G7293 DCZ V@2(@FAC) If more symbol there 7296 4A <0541> 7297 72,A4 BS G72A4 <0542> 7299 97,E0,02 DDECT V@2(@FAC) Adjust the link address also 729C 4A <0543> 729D BD,4A,E0 DST V@2(@FAC),@FAC Point to next s.t. address 72A0 02,4A <0544> 72A2 52,83 BR SCAN88 Check for more s.t. adjustmen <0545> 72A4 BD,4A,A3 G72A4 DST V@SSTMP2,@FAC Restore pointer to first argu 72A7 9C <0546> 72A8 D5,4A,A3 G72A8 DCEQ V@SSTEMP,@FAC Fix all pointers in argument 72AB 9A <0547> 72AC 72,B5 BS G72B5 <0548> 72AE 97,B0,4A DDECT V*FAC Shift address by 2 bytes <0549> 72B1 95,4A DINCT @FAC Go to next argument pointer <0550> 72B3 52,A8 BR G72A8 <0551> 72B5 97,3E G72B5 DDECT @SYMTAB Restore s.t. pointer <0552> 72B7 97,40 DDECT @FREPTR Restore free pointer <0553> * Done with building a subprogram table. <0554> 72B9 D6,42,B6 CEQ RPARZ,@CHAT Next character not ")" ? <0555> 72BC 72,C4 BS G72C4 <0556> 72BE 06,71,4F CALL CHKSYN Must be "," <0557> 72C1 B3 BYTE COMMAZ <0558> 72C2 52,52 BR SCAN86 Ge get more argument <0559> 72C4 0F,79 G72C4 XML PGMCHR Finished... <0560> 72C6 06,71,5A CALL CHKEND Check if end of statement <0561> 72C9 51,56 BR ERRSYX If not, error <0562> 72CB B2,16,DF SCAN90 AND >DF,@XFLAG Finished scanning sub argumen <0563> 72CE A3,A3,9A DADD 6,V@SSTEMP Point to location of pointer 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0048 EDIT-359 72D1 00,06 <0564> * in subtab <0565> 72D3 51,3F BR CONSCN Start scanning subprogram [0012] *********************************************************** [0013] COPY 'DSK5.MYXB3-F' <0001> *********************************************************** <0002> * SUBNDS and SUBXTS <0003> * This routine scans SUBEND and SUBEXIT statement <0004> *********************************************************** <0005> 72D5 06,71,47 SUBNDS CALL IMPILL Can't be imperative <0006> 72D8 DA,16,08 CLOG >08,@XFLAG <0007> 72DB 76,6F BS ERRSNS <0008> ********* MUST BE IN SUBPROGRAM message above ************* <0009> 72DD D6,42,A8 CEQ SUBNDZ,@CHAT <0010> 72E0 52,FB BR G72FB Check for end of statement <0011> 72E2 8E,17 CZ @FORNET Check FOR-NEXT nesting <0012> 72E4 56,6B BR ERRFNN <0013> 72E6 DA,16,01 CLOG >01,@XFLAG <0014> 72E9 56,6F BR ERRSNS <0015> 72EB DA,16,40 CLOG >40,@XFLAG <0016> 72EE 51,56 BR ERRSYX <0017> 72F0 BD,00,A3 DST V@SSTEMP,@VAR0 72F3 9A <0018> 72F4 BD,B0,00 DST @SYMTAB,V*VAR0 72F7 3E <0019> 72F8 B6,16,01 OR >01,@XFLAG <0020> 72FB 50,A4 G72FB BR SCAN22 Check for end of statement <0021> *********************************************************** <0022> * ENTER and ENTERX routines <0023> * These routines take care of entering a symbol into the <0024> * symbol table. If a symbol is encountered which is already <0025> * in the table, the usage of the symbol is checked for <0026> * consistency. <0027> *********************************************************** <0028> 72FD 06,76,40 ENTER CALL PGMERR Get next token - error if EOL <0029> 7300 D2,42,00 ENTERW CGE >00,@CHAT If token - error <0030> 7303 51,56 BR ERRSYX <0031> 7305 BE,59,49 ENTERX ST FAC-1,@FAC15 FOR INDIRECTION IN NAME SAVE <0032> 7308 BD,0C,2C DST @PGMPTR,@NMPTR SAVE POINTER TO NAME <0033> 730B 93,0C DDEC @NMPTR CORRECT FOR PGMCHR POST INCRE <0034> ******************** Accumulate the name of the symbol <0035> 730D 90,59 ENT01 INC @FAC15 Count the character <0036> 730F C6,59,58 CH FAC14,@FAC15 <0037> 7312 76,57 BS NTLERR <0038> 7314 BC,90,59 ST @CHAT,*FAC15 Save it 7317 42 <0039> 7318 0F,79 XML PGMCHR Get the next one <0040> 731A CE,42,00 CGT >00,@CHAT If not token or EOL <0041> 731D 73,0D BS ENT01 <0042> 731F BD,6C,2C DST @PGMPTR,@ARG16 Save text pointer to put into <0043> 7322 93,6C DDEC @ARG16 symbol table entry loater <0044> 7324 D6,90,59 CEQ >24,*FAC15 String variable? 7327 24 <0045> 7328 53,2D BR G732D <0046> 732A B6,16,10 OR >10,@XFLAG Set string flag <0047> 732D A6,59,4A G732D SUB FAC,@FAC15 Calculate length of name <0048> 7330 90,59 INC @FAC15 + offset of 1 <0049> 7332 D6,42,B7 CEQ LPARZ,@CHAT If complex <0050> 7335 73,82 BS ENT22 <0051> 7337 DA,16,80 CLOG >80,@XFLAG If ENTERX <0052> 733A 53,41 BR ENT08 <0053> 733C DA,16,04 CLOG >04,@XFLAG <0054> 733F 71,56 BS ERRSYX <0055> * If not DEF then DIM without subscripted variable 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0049 EDIT-359 <0056> *********************************************************** <0057> * CODE FOR SIMPLE ENTRY INTO TABLE <0058> * This incudes all non-dimensioned variables as well as <0059> * phony entries for no-parameter functions. ENT09 is the <0060> * entry point for entering one of these phony entries ENT10 <0061> * is the code which checks for consistent use of symbols <0062> * within the user's program. <0063> *********************************************************** <0064> 7341 93,2C ENT08 DDEC @PGMPTR Correct pointer overshoot <0065> 7343 BD,0E,2C ENT09 DST @PGMPTR,@CHSAV Save character pointer <0066> 7346 86,80,B0 CLR @STKMIN+1 Zero dimensions for simple <0067> 7349 BE,10,B0 ST STKMIN+1,@TOPSTK Save top of stack <0068> 734C DA,45,08 CLOG >08,@FLAG No search in function <0069> 734F 53,72 BR ENT16 <0070> 7351 0F,7D XML SCHSYM Search symbol table <0071> 7353 53,72 BR ENT16 Not found - must enter it <0072> 7355 91,2C DINC @PGMPTR Correct pointer undershoot <0073> * Common code used by SIMPLE and COMPLEX <0074> * When the symbol appears in the SYMBOL TABLE. It varifies <0075> * that the declarations are the same <0076> * (# of paremeters/dimensions, string, funciton) <0077> 7357 DA,16,80 ENT10 CLOG >80,@XFLAG Redeclaring <0078> 735A 76,5F BS ERRMUV <0079> 735C DA,16,24 CLOG >24,@XFLAG If function or sub-arg <0080> 735F 56,5F BR ERRMUV Then redefining variable UDF <0081> 7361 BC,00,B0 ST V*FAC,@VAR0 Fetch declaration 7364 4A <0082> 7365 B2,00,07 AND >07,@VAR0 MASK FUNCTION AND STRING BITS <0083> 7368 D4,00,90 CEQ *TOPSTK,@VAR0 Not same # of dim 736B 10 <0084> 736C 56,5F BR ERRMUV <0085> 736E B2,16,6B AND >6B,@XFLAG Clear FNCFLG, STRFLG and ENTE <0086> 7371 00 RTN All OK - Type matches perfect <0087> 7372 35,00,10 ENT16 MOVE 16,@FAC,@ARG Save name 7375 5C,4A <0088> 7377 BF,14,00 DST 14,@NMLEN Need 14 bytes for a simple va 737A 0E <0089> 737B DA,16,14 CLOG >14,@XFLAG String or function? <0090> 737E 74,9C BS ENT61 No - allocate & update table <0091> 7380 54,98 BR ENT60 Yes - need 8 bytes for them <0092> * Set count to 8 and update <0093> *********************************************************** <0094> * CODE FOR A COMPLEX ENTER <0095> *********************************************************** <0096> 7382 BD,0E,2C ENT22 DST @PGMPTR,@CHSAV Save the line pointer <0097> 7385 BE,72,AF ST STKMIN,@STACK Initiaze base of date stack <0098> 7388 35,00,10 MOVE 16,@FAC,@ARG Save name 738B 5C,4A <0099> 738D DA,16,84 CLOG >84,@XFLAG ENTERX or inside a DEF ? <0100> 7390 53,BB BR ENT28 Yes, require special scanning <0101> 7392 0F,79 ENT24 XML PGMCHR Get next character <0102> 7394 06,71,4F CALL CHKSYN Must have numeric constant <0103> 7397 C8 BYTE NUMCOZ <0104> 7398 06,76,BF CALL CSINT Convert dimension to integer <0105> 739B 76,7B BS ERRBV If got an error on conversion <0106> 739D 8E,4A CZ @FAC If not BIG dim <0107> 739F 53,A6 BR G73A6 <0108> 73A1 C8,4B,43 CHE @BASE,@FAC1 Dim < BASE <0109> 73A4 56,7B BR ERRBV <0110> 73A6 8C,4B G73A6 PUSH @FAC1 Push this dimension <0111> 73A8 8C,4A PUSH @FAC Both bytes <0112> 73AA C6,72,BD CH STKMAX,@STACK If too many dims <0113> 73AD 71,56 BS ERRSYX <0114> 73AF D6,42,B3 CEQ COMMAZ,@CHAT If comma-more dims 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0050 EDIT-359 <0115> 73B2 73,92 BS ENT24 <0116> 73B4 D6,42,B6 CEQ RPARZ,@CHAT Ok if end on rpar <0117> 73B7 74,11 BS ENT40 <0118> 73B9 51,56 BR ERRSYX Didn't end on a rpar <0119> ******************* Code for a non-DIM statement <0120> 73BB BE,00,01 ENT28 ST 1,@VAR0 Parenthisis level counter <0121> * At first level <0122> 73BE 06,76,40 ENT29 CALL PGMERR Get next token - error if EOL <0123> 73C1 CE,42,00 CGT >00,@CHAT <0124> 73C4 53,CD BR G73CD <0125> 73C6 DA,16,20 CLOG >20,@XFLAG Not accepted? <0126> 73C9 56,77 BR ERRBA <0127> 73CB 53,BE BR ENT29 Get next token <0128> 73CD D6,42,B6 G73CD CEQ RPARZ,@CHAT <0129> 73D0 74,09 BS ENT34 <0130> 73D2 DA,16,04 CLOG >04,@XFLAG <0131> 73D5 51,56 BR ERRSYX <0132> 73D7 D6,42,B3 CEQ COMMAZ,@CHAT <0133> 73DA 53,EC BR G73EC <0134> 73DC CE,00,01 CGT >01,@VAR0 If not top-level command <0135> 73DF 73,BE BS ENT29 <0136> 73E1 8C,07 PUSH @DFLTLM+1 <0137> 73E3 8C,06 PUSH @DFLTLM Push a default limit <0138> 73E5 CE,72,BD CGT STKMAX,@STACK NOT too many dim <0139> 73E8 53,BE BR ENT29 <0140> 73EA 51,56 BR ERRSYX Too many dims - so error <0141> * Jump always <0142> 73EC DA,16,20 G73EC CLOG >20,@XFLAG * BAD ARGUMENT <0143> 73EF 56,77 BR ERRBA <0144> 73F1 D6,42,C7 CEQ STRINZ,@CHAT <0145> 73F4 53,FB BR G73FB <0146> 73F6 06,76,48 ENT30 CALL SKPSTR <0147> 73F9 53,BE BR ENT29 <0148> 73FB D6,42,C8 G73FB CEQ NUMCOZ,@CHAT <0149> 73FE 73,F6 BS ENT30 <0150> 7400 D6,42,B7 CEQ LPARZ,@CHAT <0151> 7403 54,07 BR G7407 <0152> 7405 90,00 INC @VAR0 Increase nesting level <0153> 7407 53,BE G7407 BR ENT29 Not anything above. Get next <0154> 7409 92,00 ENT34 DEC @VAR0 Decrease nesting level <0155> 740B 53,BE BR ENT29 Continue scan unless through <0156> 740D 8C,07 PUSH @DFLTLM+1 Push final default limit <0157> 740F 8C,06 PUSH @DFLTLM <0158> *********************************************************** <0159> * Calculate number of dims and search symbol table <0160> *********************************************************** <0161> 7411 BC,00,72 ENT40 ST @STACK,@VAR0 Compute the # of dims <0162> 7414 A6,00,AF SUB STKMIN,@VAR0 <0163> 7417 E6,00,01 SRL 1,@VAR0 Divide by 2 <0164> 741A 8C,00 PUSH @VAR0 Push the number of dims on to <0165> 741C BC,10,72 ST @STACK,@TOPSTK Save stack top <0166> 741F 35,00,10 MOVE 16,@ARG,@FAC Get name back 7422 4A,5C <0167> 7424 0F,7D XML SCHSYM Search symbol table for it <0168> 7426 54,2D BR ENT44 Not found in table - ENTER it <0169> 7428 BD,2C,0E DST @CHSAV,@PGMPTR Restore scan restart at "(" <0170> 742B 53,57 BR ENT10 And check for consistency <0171> 742D DA,16,24 ENT44 CLOG >24,@XFLAG If function or subprogram <0172> 7430 54,98 BR ENT60 argument then need 8 bytes <0173> * Caculate total number of array elements <0174> 7432 BC,10,72 ST @STACK,@TOPSTK Save stack pointer <0175> 7435 92,72 DEC @STACK Skip # of dims <0176> 7437 BC,4A,90 POP @FAC Assume base=0 743A 7C 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0051 EDIT-359 <0177> 743B BC,4B,90 POP @FAC1 743E 7C <0178> 743F 91,4A DINC @FAC <0179> 7441 86,08 CLR @VARC But correct if base=1 <0180> 7443 BC,09,43 ST @BASE,@VARC+1 Handle 1st dim specially to <0181> 7446 A5,4A,08 DSUB @VARC,@FAC Avoid 1 multiply <0182> 7449 BD,14,4A DST @FAC,@NMLEN FAC gets # of elements in arr <0183> 744C 05,74,69 B ENT53 Merge into loop <0184> 744F BC,4A,90 ENT50 POP @FAC Get next dimension 7452 7C <0185> 7453 BC,4B,90 POP @FAC1 7456 7C <0186> 7457 91,4A DINC @FAC Assume base=0 <0187> 7459 A5,4A,08 DSUB @VARC,@FAC But correct if base=1 <0188> 745C BD,02,14 DST @NMLEN,@ACCUM <0189> 745F A9,02,4A DMUL @FAC,@ACCUM Accumulate size <0190> 7462 8F,02 DCZ @ACCUM Out of memory <0191> 7464 56,63 BR ERRMEM <0192> 7466 BD,14,04 DST @ACCUM+2,@NMLEN <0193> 7469 D6,72,AF ENT53 CEQ STKMIN,@STACK <0194> 746C 54,4F BR ENT50 <0195> 746E DA,14,E0 CLOG >E0,@NMLEN If any of the top 3 bits set <0196> 7471 56,63 BR ERRMEM then * MEMORY FULL <0197> 7473 E3,14,00 DSLL 1,@NMLEN Assume string| memory=elemets 7476 01 <0198> 7477 DA,16,10 CLOG >10,@XFLAG But it numeric <0199> 747A 54,80 BR G7480 <0200> 747C E3,14,00 DSLL 2,@NMLEN Memory = 4*(2 * # of elements 747F 02 <0201> 7480 A3,14,00 G7480 DADD 6,@NMLEN Need 6 more bytes for header 7483 06 <0202> 7484 86,4A CLR @FAC For double <0203> 7486 BC,4B,90 ST *TOPSTK,@FAC1 Get # of dimensions 7489 10 <0204> 748A E2,4B,01 SLL 1,@FAC1 Multiply by 2 <0205> 748D BD,08,4A DST @FAC,@VARC Save # of elements for later <0206> 7490 A1,14,4A DADD @FAC,@NMLEN Total # of bytes needed <0207> 7493 0C CARRY <0208> 7494 76,63 BS ERRMEM <0209> 7496 54,9C BR ENT61 Jump always <0210> 7498 BF,14,00 ENT60 DST 8,@NMLEN Functions & simple strings ne 749B 08 <0211> *********************************************************** <0212> * Check to see if enough memory in VDP RAM or ERAM <0213> * Put symbol name in table if imperatively created or if <0214> * excuting an ERAM program. <0215> *********************************************************** <0216> 749C 8E,80,84 ENT61 CZ @RAMTOP If not ERAM <0217> 749F 54,A5 BR G74A5 <0218> 74A1 8E,44 CZ @PRGFLG If program mode <0219> 74A3 54,C2 BR ENT62 <0220> 74A5 8E,6B G74A5 CZ @ARG15 If 0-length (function) <0221> 74A7 74,C2 BS ENT62 <0222> * Move the name into the symbol table <0223> 74A9 86,00 CLR @VAR0 Re-do name and pointer <0224> 74AB BC,01,6B ST @ARG15,@VAR0+1 Get length of name <0225> 74AE BD,4A,00 DST @VAR0,@FAC Put length for MEMCHK <0226> 74B1 0F,72 XML MEMCHK Check enough memory for name <0227> 74B3 76,63 BS ERRMEM * MEMORY FULL <0228> 74B5 A5,40,00 DSUB @VAR0,@FREPTR Get space for the name <0229> 74B8 BD,0C,40 DST @FREPTR,@NMPTR Set new pointer to name <0230> 74BB 91,0C DINC @NMPTR New pointer to name <0231> 74BD 34,00,B0 MOVE @VAR0,@ARG,V*NMPTR Move the name 74C0 0C,5C 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0052 EDIT-359 <0232> 74C2 86,51 ENT62 CLR @FAC7 Assume not simple numeric <0233> 74C4 8E,80,84 CZ @RAMTOP Set simple numeric variable <0234> 74C7 75,37 BS ENT63A <0235> 74C9 BC,72,10 ST @TOPSTK,@STACK Get # of dimensions of pareme <0236> 74CC BC,52,90 POP @FAC8 74CF 7C <0237> 74D0 DA,16,14 CLOG >14,@XFLAG If string or UDFunction <0238> 74D3 54,EB BR ENT62A Yes, don't set FAC7 <0239> * No, if array? <0240> 74D5 8E,52 CZ @FAC8 Not array <0241> 74D7 54,EB BR ENT62A <0242> 74D9 90,51 INC @FAC7 Has to be a simple numeric <0243> 74DB BD,00,14 DST @NMLEN,@VAR0 Check enough memory in VDP <0244> 74DE BF,14,00 DST 8,@NMLEN For later use - to locate 74E1 08 <0245> 74E2 BD,4A,14 DST @NMLEN,@FAC Check enough memory in VDP <0246> 74E5 0F,72 XML MEMCHK <0247> 74E7 76,63 BS ERRMEM * MEMORY FULL <0248> 74E9 55,22 BR ENT63 Check enough memory in ERAM <0249> 74EB 86,50 ENT62A CLR @FAC6 <0250> 74ED DA,16,04 CLOG >04,@XFLAG <0251> 74F0 55,37 BR ENT63A <0252> * UDFunction <0253> 74F2 BC,50,52 ST @FAC8,@FAC6 <0254> 74F5 8E,50 CZ @FAC6 String or numeric array? <0255> 74F7 75,37 BS ENT63A <0256> * If numeric array goto ENT62B. When checking subprogram <0257> * arguments, numeric array is treated the same as string <0258> * array case. <0259> 74F9 DA,16,20 CLOG >20,@XFLAG <0260> 74FC 55,03 BR ENT62C <0261> 74FE DA,16,10 CLOG >10,@XFLAG <0262> 7501 75,07 BS ENT62B <0263> 7503 86,50 ENT62C CLR @FAC6 Clear FAC6 to indicate string <0264> 7505 55,37 BR ENT63A So skip the next portion <0265> * Numeric array case... <0266> 7507 BD,00,14 ENT62B DST @NMLEN,@VAR0 Store @NMLEN in temporary <0267> 750A BD,14,08 DST @VARC,@NMLEN # of bytes for dimension info <0268> 750D A3,14,00 DADD 8,@NMLEN # of bytes need in the symbol 7510 08 <0269> * table entry in VDP RAM <0270> 7511 BD,4A,14 DST @NMLEN,@FAC Check enough memory in VDP RA <0271> 7514 0F,72 XML MEMCHK <0272> 7516 76,63 BS ERRMEM * MEMORY FULL <0273> 7518 BD,4A,00 DST @VAR0,@FAC Restore @NMLEN from VAR0 <0274> 751B A5,4A,08 DSUB @VARC,@FAC <0275> 751E A7,4A,00 DSUB 6,@FAC 7521 06 <0276> 7522 BD,4C,80 ENT63 DST @RAMFRE,@FAC2 Get ERAM free pointer 7525 86 <0277> 7526 A5,4C,4A DSUB @FAC,@FAC2 Calculate lowest address need <0278> 7529 91,4C DINC @FAC2 One byte off here <0279> 752B CB,4C,A0 DCHE CPUBAS,@FAC2 * MEMORY FULL 752E 40 <0280> 752F 56,63 BR ERRMEM <0281> 7531 BD,80,86 DST @FAC2,@RAMFRE Set new ERAM freespace pointe 7534 4C <0282> 7535 55,3E BR ENT65 <0283> 7537 BD,4A,14 ENT63A DST @NMLEN,@FAC No, # of bytes needed <0284> 753A 0F,72 XML MEMCHK * MEMORY FULL <0285> 753C 76,63 BS ERRMEM in VDP RAM <0286> * Now, construct the entry for the symbol table in the FAC <0287> * for ease and speed. Then move it to VDP RAM <0288> 753E 86,4A ENT65 CLR @FAC Clear the header byte 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0053 EDIT-359 <0289> 7540 DA,16,10 CLOG >10,@XFLAG If string <0290> 7543 75,48 BS G7548 <0291> 7545 B6,4A,80 OR >80,@FAC Set string bit in header <0292> 7548 DA,16,04 G7548 CLOG >04,@XFLAG If UDFunction <0293> 754B 75,50 BS G7550 <0294> 754D B6,4A,40 OR >40,@FAC Set function bit <0295> 7550 BC,72,10 G7550 ST @TOPSTK,@STACK Get # of dimensions or parame <0296> 7553 BC,52,90 POP @FAC8 7556 7C <0297> 7557 8E,52 CZ @FAC8 If array or parameters <0298> 7559 75,66 BS ENT67 <0299> 755B B4,4A,52 OR @FAC8,@FAC Overlay # of dimensions <0300> 755E DA,16,24 CLOG >24,@XFLAG If def or sub-arg <0301> 7561 55,66 BR ENT67 Don't set opt flag <0302> 7563 B6,16,02 OR >02,@XFLAG Array so set OPTION BASE flag <0303> 7566 BC,4B,6B ENT67 ST @ARG15,@FAC1 Save length of name <0304> 7569 BD,4C,3E DST @SYMTAB,@FAC2 Link to previous entry <0305> 756C BD,4E,0C DST @NMPTR,@FAC4 Save pointer to the name <0306> 756F A5,40,14 DSUB @NMLEN,@FREPTR Set new table pointer <0307> 7572 91,40 DINC @FREPTR <0308> * Move the entry from the FAC to the symbol table <0309> 7574 35,00,06 MOVE 6,@FAC,V*FREPTR 7577 B0,40,4A <0310> 757A BD,3E,40 DST @FREPTR,@SYMTAB Pointer to beginning of table <0311> 757D DA,45,08 CLOG >08,@FLAG If not run-function modify <0312> 7580 55,8B BR G758B <0313> 7582 DA,16,08 CLOG >08,@XFLAG If not in subprogram <0314> 7585 55,8B BR G758B <0315> 7587 BD,A3,76 DST @SYMTAB,V@SYMBOL Save pointer in VDP RAM 758A 3E <0316> 758B A3,40,00 G758B DADD 6,@FREPTR 758E 06 <0317> 758F 8E,80,84 CZ @RAMTOP If ERAM exists then <0318> 7592 75,C1 BS G75C1 <0319> 7594 D6,51,01 CEQ >01,@FAC7 If simple numeric variable <0320> 7597 55,A8 BR G75A8 <0321> 7599 BD,14,00 DST @VAR0,@NMLEN Restore NMLEN <0322> 759C BD,B0,40 DST @RAMFRE,V*FREPTR Set the pointer into ERAM 759F 80,86 <0323> 75A1 DA,16,20 CLOG >20,@XFLAG <0324> 75A4 55,F3 BR ENT69 <0325> 75A6 55,BF BR G75BF <0326> 75A8 DA,16,20 G75A8 CLOG >20,@XFLAG <0327> 75AB 55,F3 BR ENT69 <0328> 75AD 8E,50 CZ @FAC6 If numeric array <0329> 75AF 75,BF BS G75BF <0330> 75B1 BD,14,00 DST @VAR0,@NMLEN Restore NMLEN <0331> 75B4 BD,00,08 DST @VARC,@VAR0 Leave the space for dimension <0332> * info whtich is going to be <0333> * filled in later <0334> 75B7 A1,00,40 DADD @FREPTR,@VAR0 <0335> 75BA BD,B0,00 DST @RAMFRE,V*VAR0 Set pointer in ERAM 75BD 80,86 <0336> 75BF 55,C6 G75BF BR G75C6 <0337> 75C1 DA,16,20 G75C1 CLOG >20,@XFLAG <0338> 75C4 55,F3 BR ENT69 <0339> 75C6 DA,16,04 G75C6 CLOG >04,@XFLAG If UDF - no dimensions <0340> 75C9 75,D1 BS G75D1 <0341> 75CB BD,B0,40 DST @ARG16,V*FREPTR SAVE POINTER TO "(" OR "=" 75CE 6C <0342> 75CF 56,28 BR ENT69B Jump always <0343> **** Save the dimension information in the symbol table <0344> 75D1 CE,72,AF G75D1 CGT STKMIN,@STACK If non-array <0345> 75D4 55,F3 BR ENT69 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0054 EDIT-359 <0346> 75D6 BE,72,AF ST STKMIN,@STACK Get to bottom of stack <0347> 75D9 90,72 ENT68 INC @STACK Point tat LSB of next entry <0348> 75DB C8,72,10 CHE @TOPSTK,@STACK If finished, out <0349> 75DE 75,F3 BS ENT69 <0350> 75E0 BC,E0,01 ST *STACK,V@>01(@FREPTR) * Put directly into tabl 75E3 40,90,72 <0351> 75E6 90,72 INC @STACK Point at MSB of next entry <0352> 75E8 BC,B0,40 ST *STACK,V*FREPTR Put directly into table 75EB 90,72 <0353> 75ED 97,14 DDECT @NMLEN Used up 2 bytes in table <0354> 75EF 95,40 DINCT @FREPTR Adjust pointer to unused byte <0355> 75F1 55,D9 BR ENT68 Get next dimension <0356> ***** Now, zero the required amount of memory <0357> 75F3 8E,80,84 ENT69 CZ @RAMTOP If ERAM exists <0358> 75F6 76,1A BS ENT69D <0359> 75F8 DA,16,10 CLOG >10,@XFLAG <0360> 75FB 56,1A BR ENT69D <0361> 75FD D6,51,01 CEQ >01,@FAC7 If simple numeric variable <0362> 7600 56,08 BR G7608 <0363> 7602 BF,14,00 DST 8,@NMLEN Zero 8 bytes of ERAM memory 7605 08 <0364> 7606 56,10 BR ENT69C <0365> 7608 8E,50 G7608 CZ @FAC6 If numeric array <0366> 760A 76,18 BS G7618 <0367> 760C A7,14,00 DSUB 6,@NMLEN Calculate amount of ERAM to c 760F 06 <0368> 7610 0F,84 ENT69C XML IO Special code to clear ERAM <0369> 7612 03 BYTE 3 * Select the clear - ERAM code <0370> 7613 86 BYTE RAMFRE * Address of ERAM address <0371> 7614 14 BYTE NMLEN * Address of number of bytes <0372> 7615 93,80,86 DDEC @RAMFRE Adjust ERAM free pointer <0373> 7618 56,28 G7618 BR ENT69B VDP case <0374> 761A A7,14,00 ENT69D DSUB 7,@NMLEN Now clear VDP RAM 761D 07 <0375> 761E 86,B0,40 CLR V*FREPTR Clear 1st byte, then the rest <0376> 7621 34,14,E0 MOVE @NMLEN,V*FREPTR,V@1(@FREPTR) 7624 01,40,B0 7627 40 <0377> 7628 BD,40,3E ENT69B DST @SYMTAB,@FREPTR Set new free pointer @ then t <0378> 762B 93,40 DDEC @FREPTR Now, set it at 1st free byte <0379> 762D B2,16,EB AND >EB,@XFLAG Clear STRFLG and FNCFLG <0380> 7630 DA,16,80 CLOG >80,@XFLAG If ENTERX call <0381> 7633 76,3D BS G763D <0382> 7635 DA,16,20 CLOG >20,@XFLAG If not scanning <0383> 7638 56,3D BR G763D a subprogram argument then <0384> 763A BD,2C,0E DST @CHSAV,@PGMPTR Restore character pointer <0385> 763D 0F,79 G763D XML PGMCHR Get next character <0386> 763F 00 RTN <0387> *********************************************************** <0388> * THIS ROUTINE READS A CHARACTER AND WILL GIVE AN ERROR IF <0389> * IT READS AN END OF LINE (PREMATURE END) <0390> *********************************************************** <0391> 7640 0F,79 PGMERR XML PGMCHR <0392> 7642 06,71,5A CALL CHKEND <0393> 7645 71,56 BS ERRSYX Premature EOL <0394> 7647 00 RTN <0395> *********************************************************** <0396> * THIS ROUTINE SKIPS QUOTED STRINGS UNQUOTED STRINGS AND <0397> * NUMERIC CONSTANTS <0398> *********************************************************** <0399> 7648 0F,79 SKPSTR XML PGMCHR Get the byte count <0400> 764A 86,08 CLR @VARC for double <0401> 764C BC,09,42 ST @CHAT,@VARC+1 Get count for add <0402> 764F A1,2C,08 DADD @VARC,@PGMPTR Skip the string 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0055 EDIT-359 <0403> 7652 00 RTN <0404> * ERROR messages called in this file <0405> 7653 06,6D,4E ERRIBS CALL ERRZZ * ILLEGAL AFTER SUBPROGRAM <0406> 7656 04 BYTE 4 <0407> 7657 06,6D,4E NTLERR CALL ERRZZ * NAME TOO LONG <0408> 765A 06 BYTE 6 <0409> 765B 06,6D,4E ERROBE CALL ERRZZ * OPTION BASE ERROR <0410> 765E 08 BYTE 8 <0411> 765F 06,6D,4E ERRMUV CALL ERRZZ * IMPROPERLY USED NAME <0412> 7662 09 BYTE 9 <0413> 7663 06,6D,4E ERRMEM CALL ERRZZ * MEMORY FULL <0414> 7666 0B BYTE 11 <0415> 7667 06,6D,4E ERRNWF CALL ERRZZ * NEXT WITHOUT FOR <0416> 766A 0D BYTE 13 <0417> 766B 06,6D,4E ERRFNN CALL ERRZZ * FOR/NEXT NESTING <0418> 766E 0E BYTE 14 <0419> 766F 06,6D,4E ERRSNS CALL ERRZZ * MUST BE IN SUBPROGRAM <0420> 7672 0F BYTE 15 <0421> 7673 06,6D,4E ERRMS CALL ERRZZ * MISSING SUBEND <0422> 7676 11 BYTE 17 <0423> 7677 06,6D,4E ERRBA CALL ERRZZ * BAD ARGUMENT <0424> 767A 1C BYTE 28 <0425> 767B 06,6D,4E ERRBV CALL ERRZZ * BAD VALUE <0426> 767E 1E BYTE 30 <0427> * Other error messages inside this program <0428> * ERRSYN * SYNTAX ERROR DATA 3 <0429> * ERROLP * ONLY LEGAL IN A PROGRAM DATA 27 <0430> * ERRPV * PROTECTION VIOLATION DATA 39 <0431> *********************************************************** <0432> * Search and clean up stack and symbol table to not allow <0433> * garbage to accumulate <0434> *********************************************************** <0435> 767F BD,52,6E CLEAN DST @VSPTR,@FAC8 Get a temporary stack pointer <0436> 7682 C5,52,24 CLEAN1 DCH @STVSPT,@FAC8 While not end of stack <0437> 7685 56,BE BR G76BE <0438> 7687 BC,58,E0 ST V@2(@FAC8),@FAC14 Get stack ID byte 768A 02,52 <0439> 768C A6,58,66 SUB >66,@FAC14 Check the range <0440> 768F C6,58,04 CH >04,@FAC14 If string, numeric, >70, >72 <0441> 7692 56,98 BR G7698 <0442> 7694 0F,78 XML VPOP Throw it away (Must be on top <0443> 7696 56,7F BR CLEAN <0444> 7698 8A,58 G7698 CASE @FAC14 <0445> 769A 56,A7 BR CLEANG GOSUB entry >6 <0446> 769C 56,AD BR CLEANF FOR entry >6 <0447> 769E 56,B7 BR CLEANU UDF entry >6 <0448> 76A0 56,A4 BR CLEANE ERROR entry >6 <0449> 76A2 56,B1 BR CLEANS SUB entry >6 <0450> 76A4 06,A0,14 CLEANE CALL SQUISH ERROR Entry - squish it out <0451> 76A7 A7,52,00 CLEANG DSUB 8,@FAC8 Go down 1 entry 76AA 08 <0452> 76AB 56,82 BR CLEAN1 Go on to next entry <0453> * Jump always <0454> 76AD A7,52,00 CLEANF DSUB 16,@FAC8 Keep it around but get below 76B0 10 <0455> 76B1 A7,52,00 CLEANS DSUB 16,@FAC8 16 bytes further down 76B4 10 <0456> 76B5 56,82 BR CLEAN1 FOR or SUB entry <0457> * Jump always <0458> 76B7 87,4E CLEANU DCLR @FAC4 Cause delink to work right <0459> 76B9 06,A0,10 CALL DELINK Delink the symbol table entry <0460> 76BC 56,A7 BR CLEANG <0461> 76BE 00 G76BE RTN [0014] *********************************************************** 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0056 EDIT-359 [0015] COPY 'DSK5.MYXB3-G' <0001> *********************************************************** <0002> * Subroutine to convert numeric to integer <0003> *********************************************************** <0004> 76BF 87,4A CSINT DCLR @FAC Start with clean FAC <0005> 76C1 0F,79 CSINT2 XML PGMCHR <0006> 76C3 A6,42,30 SUB >30,@CHAT Subtract ASCII value for "0" <0007> 76C6 CA,42,0A CHE >0A,@CHAT Valid numeric <0008> 76C9 76,E3 BS G76E3 <0009> 76CB AB,4A,00 DMUL 10,@FAC Multiply previous result 76CE 0A <0010> 76CF 8F,4A DCZ @FAC Overflow ?????? <0011> 76D1 56,E7 BR RETSET <0012> 76D3 BC,4B,42 ST @CHAT,@FAC1 Get result back down <0013> 76D6 A1,4A,4C DADD @FAC2,@FAC Add current digit <0014> 76D9 0C CARRY If >65535 <0015> 76DA 76,E7 BS RETSET <0016> 76DC D2,4A,00 CGE >00,@FAC Integer > 32767 <0017> 76DF 56,E7 BR RETSET <0018> 76E1 56,C1 BR CSINT2 And loop until done <0019> 76E3 A2,42,30 G76E3 ADD >30,@CHAT <0020> 76E6 00 RTN Also used somewhere else <0021> 76E7 D4,00,00 RETSET CEQ @>8300,@>8300 <0022> 76EA 01 RTNC <0023> * <0024> * GKXB CODE FOLLOWS *************************************** <0025> 76EB 87,2C RES1 DCLR @PGMPTR Set flag <0026> 76ED BD,64,30 DST @STLN,@XSTLN Save STLN & ENLN <0027> 76F0 BD,66,32 DST @ENLN,@XENLN <0028> 76F3 06,65,71 CALL AUTON Get first parameters <0029> 76F6 90,2C INC @PGMPTR Destroy flag <0030> 76F8 00 RTN <0031> * <0032> * RES2 entered from AUTON if more than 2 numbers entered <0033> * <0034> 76F9 8F,2C RES2 DCZ @PGMPTR Check flag <0035> 76FB 77,00 BS RES2A Yes, continue <0036> 76FD 05,78,54 B CKOTHR No, check for copy & move <0037> 7700 90,2C RES2A INC @PGMPTR Destroy flag <0038> 7702 D6,42,2C CEQ COMMA,@CHAT Check for comma <0039> 7705 49,7A BR ERRSY1 If no comma <0040> 7707 BD,68,14 DST @CURLIN,@XCURLI Save CURLIN & CURINC <0041> 770A BD,6A,0E DST @CURINC,@XCURIN <0042> 770D 87,14 DCLR @CURLIN Clear out pointers <0043> 770F 87,0E DCLR @CURINC <0044> 7711 BE,08,2D ST DASH,@VARC Separator <0045> 7714 06,65,7E CALL AUTO3 Get range <0046> 7717 06,77,CF CALL GTRANG Find locations in line table <0047> 771A BD,14,68 DST @XCURLI,@CURLIN Restore CURLIN & CURINC <0048> 771D BD,0E,6A DST @XCURIN,@CURINC <0049> 7720 D5,32,66 DCEQ @XENLN,@ENLN See if start line is first line <0050> 7723 77,33 BS RES3 Yes, continue <0051> 7725 BD,4A,66 DST @XENLN,@FAC Copy start addr to FAC <0052> 7728 91,4A DINC @FAC Point to next lower table entry <0053> 772A 06,80,2E CALL GRSUB3 Get line # of line before start <0054> 772D 4A BYTE FAC-PAD <0055> 772E C5,14,58 DCH @EEE1,@CURLIN New start # must be higher than <0056> * last # in preceding segment <0057> 7731 49,90 BR ERRBLN Bad line number if not! <0058> 7733 00 RES3 RTN <0059> * <0060> 7734 BD,2C,32 RES4 DST @ENLN,@PGMPTR Moved from RES routine <0061> 7737 8E,A8,20 CZ V@CRNBUF Called from RES? <0062> 773A 77,4C BS RES4B No, skip a few lines 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0057 EDIT-359 <0063> 773C D5,30,64 DCEQ @XSTLN,@STLN Renumbering to end of prog? <0064> 773F 77,51 BS RES4A Yes, skip the check <0065> 7741 BD,4A,64 DST @XSTLN,@FAC Check for high # overlap <0066> 7744 A7,4A,00 DSUB 4,@FAC Point to entry after RES segment 7747 04 <0067> 7748 06,80,2E CALL GRSUB3 Get that line # <0068> 774B 4A BYTE FAC-PAD <0069> 774C C9,14,58 RES4B DCHE @EEE1,@CURLIN Check that CURLIN is'nt higher <0070> * or equal <0071> 774F 69,90 BS ERRBLN If so, bad line number <0072> 7751 00 RES4A RTN <0073> * <0074> 7752 D6,A8,20 RES5 CEQ 6,V@CRNBUF A true RES? 7755 06 <0075> 7756 63,E9 BS TOPL25 Yes, return to basic <0076> 7758 00 RTN No, just do a return <0077> * <0078> * Code for new commands DEL, COPY, and MOVE <0079> * <0080> * NOTICE !!!!! <0081> * RAM BANK 2 CHANGED AS FOLLOWS----- <0082> * 7D1B changed from >08 to >0B <0083> * 7D35 changed from >08 to >0C <0084> * <0085> * <0086> 7759 C6,A8,20 NEWCMD CH >0B,V@CRNBUF If higher than MOVE token, 775C 0B <0087> 775D 65,1A BS SZRUN4 continue with old stuff <0088> 775F BF,2C,08 DST CRNBUF+1,@PGMPTR Anticipate usage of PGMCHR 7762 21 <0089> 7763 0F,79 XML PGMCHR Setup CHAT <0090> 7765 BC,4A,A8 ST V@CRNBUF,@FAC Copy token 7768 20 <0091> 7769 A6,4A,09 SUB 9,@FAC Adjust for CASE <0092> 776C 8A,4A CASE @FAC Select the keyword <0093> 776E 57,8A BR DEL <0094> 7770 59,6C BR COPY <0095> 7772 58,B0 BR MOVE <0096> * <0097> * Patch to change to default colors on RUN <0098> * <0099> 7774 8E,44 RUNPAT CZ @PRGFLG Program already running? <0100> 7776 57,85 BR RUNRET Yes, do nothing <0101> 7778 04,07 BACK 7 Screen color <0102> 777A BE,A8,0F ST >10,V@>80F Character colors 777D 10 <0103> 777E 35,00,10 MOVE 16,V@>80F,V@>810 7781 A8,10,A8 7784 0F <0104> 7785 86,44 RUNRET CLR @PRGFLG Moved from RUN routine <0105> 7787 05,65,04 B G6504 Return <0106> * <0107> * DEL routine... Allows the deletion of a program segment <0108> * <0109> 778A BE,08,2D DEL ST DASH,@VARC Select separator <0110> 778D 87,14 DCLR @CURLIN Clear variables <0111> 778F 87,0E DCLR @CURINC <0112> 7791 06,65,7C CALL AUTO1 Get parameters <0113> 7794 BD,64,30 DST @STLN,@XSTLN Save pointers <0114> 7797 BD,66,32 DST @ENLN,@XENLN <0115> 779A 06,77,CF CALL GTRANG Get the range to delete <0116> * <0117> 779D BD,68,32 DEL01 DST @ENLN,@XCURLI Store a copy of ENLN <0118> * 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0058 EDIT-359 <0119> 77A0 BD,4A,66 DST @XENLN,@FAC Check to see if we need <0120> 77A3 A7,4A,00 DSUB 3,@FAC to delete another line 77A6 03 <0121> 77A7 C9,4A,64 DCHE @XSTLN,@FAC <0122> 77AA 57,CC BR DELEND We're through <0123> * <0124> 77AC 06,80,2E CALL GRSUB3 Get line # of line to delete <0125> 77AF 4A BYTE FAC-PAD <0126> 77B0 BD,4A,58 DST @EEE1,@FAC Store number in FAC <0127> 77B3 BE,42,01 ST 1,@CHAT Flag to delete line <0128> 77B6 06,66,CF CALL EDITLN Delete the line <0129> * <0130> 77B9 A3,64,00 DADD 4,@XSTLN Adjust for deleted line 77BC 04 <0131> 77BD BD,4A,32 DST @ENLN,@FAC New ENLN value <0132> 77C0 A5,4A,68 DSUB @XCURLI,@FAC How much did we delete? <0133> 77C3 A1,64,4A DADD @FAC,@XSTLN New XSTLN value <0134> 77C6 A1,66,4A DADD @FAC,@XENLN New XENLN value <0135> 77C9 05,77,9D B DEL01 Loop <0136> 77CC 05,63,E6 DELEND B TOPL20 Return to basic <0137> <0138> * GTRANG - Sets XSTLN & XENLN as a line # <0139> * table for a range of line #s in CURLIN <0140> * & CURINC. XSTLN & XENLN should contain <0141> * the values in STLN & ENLN when called. <0142> * A bad line number error is generated if <0143> * the range does not contain at least one <0144> * valid program line. If CURINC is zero, <0145> * then the line # in CURLIN must be a valid <0146> * program line. A syntax error is occurs if <0147> * both CURLIN & CURINC are zero. <0148> * <0149> 77CF D5,32,30 GTRANG DCEQ @STLN,@ENLN If no program, then error <0150> 77D2 78,51 BS ERRNPP <0151> 77D4 BD,4A,32 DST @ENLN,@FAC Get first line # <0152> 77D7 A7,4A,00 DSUB 3,@FAC FAC=source addr in ERAM/VDP 77DA 03 <0153> 77DB 8F,14 DCZ @CURLIN Beginning line specified? <0154> 77DD 57,E3 BR GTRAN0 Yes, get it <0155> 77DF 8F,0E DCZ @CURINC Ending line also zero? <0156> 77E1 78,4B BS ERRSY Yes, syntax error <0157> 77E3 06,80,2E GTRAN0 CALL GRSUB3 Read the line # <0158> 77E6 4A BYTE FAC-PAD <0159> 77E7 C9,58,14 DCHE @CURLIN,@EEE1 Check for good number <0160> 77EA 77,F7 BS GTRAN2 Good number <0161> 77EC A7,4A,00 DSUB 4,@FAC Get next table entry 77EF 04 <0162> 77F0 C9,4A,30 DCHE @STLN,@FAC Make sure we're still in table <0163> 77F3 77,E3 BS GTRAN0 Loop till good number found <0164> 77F5 58,4E BR ERRBL Bad line number error <0165> 77F7 BD,66,4A GTRAN2 DST @FAC,@XENLN Store for RES routine <0166> 77FA A3,66,00 DADD 3,@XENLN Fake an ENLN entry 77FD 03 <0167> * Evaluate what's in CURINC <0168> 77FE 8F,0E GTRAN1 DCZ @CURINC Zero? <0169> 7800 58,15 BR GTRAN4 No, go get a line # <0170> 7802 BD,4C,20 DST @VARW,@FAC2 Store screen pointer <0171> 7805 93,4C GTRAN3 DDEC @FAC2 Back up one space on screen <0172> 7807 D6,B0,4C CEQ OSPACE,V*FAC2 Is it a space? 780A 80 <0173> 780B 78,05 BS GTRAN3 Yes, loop till no space <0174> 780D D6,B0,4C CEQ DASH+OFFSET,V*FAC2 Is it a dash? 7810 8D <0175> 7811 78,38 BS GTRAN7 Yes, use default for STLN 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0059 EDIT-359 <0176> 7813 58,3E BR GTRAN8 Just one # entered, check it! <0177> 7815 C5,14,0E GTRAN4 DCH @CURINC,@CURLIN End line higher than start? <0178> 7818 58,1D BR GTRAN5 No, go get end line <0179> 781A BD,0E,14 DST @CURLIN,@CURINC Make a good line # <0180> 781D 06,80,2E GTRAN5 CALL GRSUB3 Get next line # <0181> 7820 4A BYTE FAC-PAD <0182> 7821 C5,58,0E DCH @CURINC,@EEE1 Gone too far? <0183> 7824 78,31 BS GTRAN6 Yes, we're done <0184> 7826 A7,4A,00 DSUB 4,@FAC Next table entry 7829 04 <0185> 782A C9,4A,30 DCHE @STLN,@FAC Make sure we're still in table <0186> 782D 78,1D BS GTRAN5 Loop <0187> 782F 58,38 BR GTRAN7 End of table, use default <0188> 7831 A3,4A,00 GTRAN6 DADD 4,@FAC Back up one entry 7834 04 <0189> 7835 BD,64,4A GTRAN9 DST @FAC,@XSTLN Put it in place <0190> 7838 C5,64,66 GTRAN7 DCH @XENLN,@XSTLN If XSTLN > XENLN then error <0191> 783B 78,4E BS ERRBL <0192> 783D 00 RTN <0193> 783E C6,A8,20 GTRAN8 CH 9,V@CRNBUF Called from RES or DEL? 7841 09 <0194> 7842 78,35 BS GTRAN9 No, skip this check <0195> 7844 D5,14,58 DCEQ @EEE1,@CURLIN Check that line found is good <0196> 7847 58,4E BR ERRBL Bad line number if not <0197> 7849 58,35 BR GTRAN9 Set XSTLN and return <0198> * <0199> 784B 05,69,7A ERRSY B ERRSY1 <0200> 784E 05,69,90 ERRBL B ERRBLN <0201> 7851 05,64,EF ERRNPP B >64EF No program present <0202> * <0203> * CKOTHR - Intercepts error from AUTON if more than <0204> * two line #s are entered. <0205> * <0206> 7854 C6,A8,20 CKOTHR CH >B,V@CRNBUF Error if higher than MOVE 7857 0B <0207> 7858 78,4B BS ERRSY <0208> 785A C6,A8,20 CH >9,V@CRNBUF Error if lower than COPY 785D 09 <0209> 785E 58,4B BR ERRSY <0210> 7860 D6,42,2C CEQ COMMA,@CHAT Check separator <0211> 7863 58,4B BR ERRSY Error if not <0212> 7865 00 RTN Return if OK <0213> * <0214> * GETPAR - gets a line # range and a new starting <0215> * # and increment for MOVE & COPY <0216> * <0217> 7866 BD,66,32 GETPAR DST @ENLN,@XENLN Load segment pointers <0218> 7869 BD,64,30 DST @STLN,@XSTLN <0219> 786C 87,14 DCLR @CURLIN Set up variables <0220> 786E 87,0E DCLR @CURINC <0221> 7870 BE,08,2D ST DASH,@VARC Separator <0222> 7873 06,65,7C CALL AUTO1 Get segment start, end <0223> 7876 06,77,CF CALL GTRANG Get line table range <0224> 7879 8F,0E DCZ @CURINC Fix XSTLN if necessary <0225> 787B 58,80 BR GETPA3 <0226> 787D BD,64,30 DST @STLN,@XSTLN <0227> * Now get new starting # and increment <0228> 7880 87,14 GETPA3 DCLR @CURLIN Clear start line# <0229> 7882 91,20 DINC @VARW So AUTON don't screw up <0230> 7884 86,A8,20 CLR V@CRNBUF So AUTON checks EOS correctly <0231> 7887 06,65,75 CALL AUTO4 Get numbers <0232> 788A 8F,14 DCZ @CURLIN Must specify starting line # <0233> 788C 78,4B BS ERRSY Syntax error if not <0234> * Find out where to move/copy the segment 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0060 EDIT-359 <0235> 788E BD,4A,32 DST @ENLN,@FAC End of table to FAC <0236> 7891 A7,4A,00 DSUB 3,@FAC Adjust 7894 03 <0237> 7895 06,80,2E GETPA1 CALL GRSUB3 Get line # from table <0238> 7898 4A BYTE FAC-PAD <0239> 7899 C9,58,14 DCHE @CURLIN,@EEE1 If high, segment gets moved here <0240> 789C 78,AF BS GETPA2 Go move it! <0241> 789E A7,4A,00 DSUB 4,@FAC Next table entry 78A1 04 <0242> 78A2 C9,4A,30 DCHE @STLN,@FAC Make sure we're still in table <0243> 78A5 78,95 BS GETPA1 Search some more <0244> 78A7 BF,58,80 DST >8000,@EEE1 To satisfy RES routine 78AA 00 <0245> 78AB D4,4A,4A CEQ @FAC,@FAC Set COND bit <0246> 78AE 01 RTNC Return w/COND <0247> 78AF 00 GETPA2 RTN Return <0248> * <0249> * MOVE -Moves a program segment within a program <0250> * If the new starting line is within the segment to <0251> * be moved, then the segment is just renumbered. <0252> * <0253> 78B0 06,78,66 MOVE CALL GETPAR Get the parameters <0254> 78B3 78,CC BS MOVE09 Segment goes to end of program <0255> * Check to see if new start line is inside moved segment <0256> 78B5 C5,4A,66 DCH @XENLN,@FAC If FAC is higher than segment end <0257> 78B8 78,C7 BS MOVE03 then continue <0258> 78BA C5,64,4A DCH @FAC,@XSTLN If FAC is lower than segment start <0259> 78BD 78,C7 BS MOVE03 then continue <0260> * Segment need not be moved, just RES <0261> 78BF 90,A8,20 INC V@CRNBUF Fake a RES, almost <0262> 78C2 06,66,2D CALL RES6 Do the RES <0263> 78C5 59,38 BR MOVE99 Return <0264> * If new start line is a valid program line outside of <0265> * segment to be moved, then error! <0266> 78C7 D5,14,58 MOVE03 DCEQ @EEE1,@CURLIN Check for equal #s <0267> 78CA 78,4E BS ERRBL Bad line number error <0268> * New location found. <0269> 78CC BD,68,4A MOVE09 DST @FAC,@XCURLI Save FAC <0270> 78CF A3,68,00 DADD 3,@XCURLI Adjust to end of pointer 78D2 03 <0271> 78D3 BD,2A,66 DST @XENLN,@VARA Find out how many bytes to move <0272> 78D6 A5,2A,64 DSUB @XSTLN,@VARA <0273> 78D9 91,2A DINC @VARA <0274> 78DB 06,68,A6 CALL MEMFLL See if there's enough memory <0275> 78DE A1,30,2A DADD @VARA,@STLN Correct STLN <0276> 78E1 06,66,2D CALL RES6 RES the segment <0277> 78E4 06,80,12 CALL CLSALL Close all open files <0278> 78E7 06,68,DC CALL KILSYM Kill the symbol tables <0279> * Now redo the line number table <0280> * First make space for moved segment <0281> 78EA C5,30,68 DCH @XCURLI,@STLN If moving to end of prog <0282> 78ED 79,0F BS MOVE05 then skip this part <0283> 78EF BD,5C,68 DST @XCURLI,@ARG Figure byte count <0284> 78F2 A5,5C,30 DSUB @STLN,@ARG <0285> 78F5 91,5C DINC @ARG <0286> 78F7 BD,16,30 DST @STLN,@VAR9 Source address <0287> 78FA BD,00,30 DST @STLN,@VAR0 Figure destination addr <0288> 78FD A5,00,2A DSUB @VARA,@VAR0 <0289> 7900 8E,80,84 CZ @RAMTOP If pgm in VDP <0290> 7903 59,0D BR MOVE04 <0291> 7905 34,5C,B0 MOVE @ARG,V*VAR9,V*VAR0 Move it! 7908 00,B0,16 <0292> 790B 59,0F BR MOVE05 <0293> 790D 0F,89 MOVE04 XML MVUP If pgm in ERAM 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0061 EDIT-359 <0294> * Space now available to move the segment <0295> * Figure whether up or down move <0296> 790F BD,5C,2A MOVE05 DST @VARA,@ARG Byte count for next move <0297> 7912 C5,64,68 DCH @XCURLI,@XSTLN <0298> 7915 79,3E BS MOVE06 Moving to a higher line # <0299> * Move from a higher # to a lower # <0300> 7917 BD,00,64 DST @XSTLN,@VAR0 <0301> 791A 93,00 DDEC @VAR0 Source address <0302> 791C BD,06,68 DST @XCURLI,@VARY2 Destination address <0303> 791F 0F,88 XML MVDN Move it <0304> 7921 BD,5C,64 DST @XSTLN,@ARG Figure byte count <0305> 7924 A5,5C,30 DSUB @STLN,@ARG <0306> 7927 8F,5C DCZ @ARG Don't move zero bytes <0307> 7929 79,38 BS MOVE99 <0308> 792B BD,06,64 DST @XSTLN,@VARY2 Figure destination address <0309> 792E 93,06 DDEC @VARY2 <0310> 7930 BD,00,06 DST @VARY2,@VAR0 Figure source address <0311> 7933 A5,00,2A DSUB @VARA,@VAR0 <0312> 7936 0F,88 XML MVDN Move again <0313> 7938 06,80,12 MOVE99 CALL CLSALL <0314> 793B 05,63,DA B TOPL10 Return to basic <0315> * Move from a lower # to a higher # <0316> 793E BD,16,64 MOVE06 DST @XSTLN,@VAR9 Source address <0317> 7941 BD,00,68 DST @XCURLI,@VAR0 Figure destination address <0318> 7944 A5,00,2A DSUB @VARA,@VAR0 <0319> 7947 91,00 DINC @VAR0 <0320> 7949 8E,80,84 CZ @RAMTOP If pmg in VDP <0321> 794C 59,56 BR MOVE07 <0322> 794E 34,5C,B0 MOVE @ARG,V*VAR9,V*VAR0 Move it! 7951 00,B0,16 <0323> 7954 59,58 BR MOVE08 <0324> 7956 0F,89 MOVE07 XML MVUP If pgm in ERAM <0325> 7958 BD,5C,66 MOVE08 DST @XENLN,@ARG Figure byte count <0326> 795B A5,5C,30 DSUB @STLN,@ARG <0327> 795E 91,5C DINC @ARG <0328> 7960 BD,00,64 DST @XSTLN,@VAR0 Figure source address <0329> 7963 93,00 DDEC @VAR0 <0330> 7965 BD,06,66 DST @XENLN,@VARY2 Destination address <0331> 7968 0F,88 XML MVDN Move again <0332> 796A 59,38 BR MOVE99 Return <0333> * <0334> * COPY - copies a block of program lines to any <0335> * other location in the program <0336> * <0337> 796C 06,78,66 COPY CALL GETPAR Get the parameters <0338> 796F D5,14,58 DCEQ @EEE1,@CURLIN Error if trying to copy <0339> 7972 78,4E BS ERRBL to a valid line. <0340> 7974 BF,68,00 DST 4,@XCURLI Set a variable 7977 04 <0341> 7978 BD,6A,58 DST @EEE1,@XCURIN Save EEE1 <0342> * Check to see if new start line is inside copied segment <0343> 797B C5,4A,66 DCH @XENLN,@FAC If FAC is higher than segment end <0344> 797E 79,90 BS COPY03 then continue <0345> 7980 C5,64,4A DCH @FAC,@XSTLN If FAC is lower than segment start <0346> 7983 79,94 BS COPY04 then continue <0347> 7985 A3,4A,00 DADD 3,@FAC One last chance 7988 03 <0348> 7989 D5,66,4A DCEQ @FAC,@XENLN Make sure we're going lower <0349> 798C 79,90 BS COPY03 <0350> 798E 58,4E COPY05 BR ERRBL Error if we get here <0351> 7990 A7,68,00 COPY03 DSUB 4,@XCURLI New variable 7993 04 <0352> 7994 BD,4A,66 COPY04 DST @XENLN,@FAC Compute # of increments required <0353> 7997 A5,4A,64 DSUB @XSTLN,@FAC # of table entries 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0062 EDIT-359 <0354> 799A E7,4A,00 DSRL 2,@FAC # of lines 799D 02 <0355> 799E BD,66,4A DST @FAC,@XENLN Save count <0356> 79A1 91,66 DINC @XENLN Adjust <0357> 79A3 A9,4A,0E DMUL @CURINC,@FAC Compute space taken by increment <0358> 79A6 8F,4A DCZ @FAC Check overflow <0359> 79A8 58,4E BR ERRBL Error if > 65536 <0360> 79AA A1,14,4C DADD @FAC2,@CURLIN Compute highest line # <0361> 79AD 0C CARR Test carry bit <0362> 79AE 78,4E BS ERRBL Error if > 65536 <0363> 79B0 C6,14,7F CH >7F,@CURLIN Error if > 32767 <0364> 79B3 78,4E BS ERRBL <0365> 79B5 C9,14,6A DCHE @XCURIN,@CURLIN Error if last line overlaps <0366> 79B8 78,4E BS ERRBL <0367> * Do the actual COPY <0368> 79BA 95,64 DINCT @XSTLN Point to line location <0369> 79BC 06,80,2C COPY00 CALL GRSUB2 Get the location <0370> 79BF 64 BYTE XSTLN-PAD <0371> 79C0 BD,4A,58 DST @EEE1,@FAC Copy EEE1 <0372> 79C3 93,4A DDEC @FAC Point to length byte <0373> 79C5 06,80,2C CALL GRSUB2 Get the length byte <0374> 79C8 4A BYTE FAC-PAD <0375> 79C9 BC,42,58 ST @EEE1,@CHAT Store the length in CHAT <0376> 79CC BC,57,58 ST @EEE1,@FFF1+1 Also use for count <0377> 79CF 86,56 CLR @FFF1 Assure correct count <0378> 79D1 91,4A DINC @FAC FAC points to program text <0379> 79D3 8E,80,84 CZ @RAMTOP If zero, then pgm in VDP <0380> 79D6 79,E3 BS COPY01 <0381> * If program in ERAM <0382> 79D8 BD,54,4A DST @FAC,@DDD1 Source address <0383> 79DB BF,58,08 DST CRNBUF,@EEE1 Destination address 79DE 20 <0384> 79DF 0F,8B XML GVWITE Move to VDP <0385> 79E1 59,E9 BR COPY02 <0386> * If program in VDP <0387> 79E3 34,56,A8 COPY01 MOVE @FFF1,V*FAC,V@CRNBUF Move into CRNBUF 79E6 20,B0,4A <0388> * <0389> 79E9 BD,4A,14 COPY02 DST @CURLIN,@FAC Line # to FAC <0390> 79EC 06,66,CF CALL EDITLN Edit the line into program <0391> 79EF 86,4A CLR @FAC Find next line in table <0392> 79F1 BC,4B,42 ST @CHAT,@FAC1 <0393> 79F4 91,4A DINC @FAC <0394> 79F6 A5,64,4A DSUB @FAC,@XSTLN <0395> 79F9 A1,64,68 DADD @XCURLI,@XSTLN <0396> 79FC A5,14,0E DSUB @CURINC,@CURLIN Next new line # <0397> * <0398> 79FF 93,66 DDEC @XENLN Count -1 <0399> 7A01 59,BC BR COPY00 Loop if not done <0400> 7A03 05,63,E6 B TOPL20 Return <0401> * <0402> * Code to pick up line # range and record <0403> * length for LIST routine <0404> * <0405> 7A06 86,64 GTLIST CLR @XSTLN Clear for record length <0406> 7A08 86,08 CLR @VARC Force an error, maybe <0407> 7A0A 06,65,7C CALL AUTO1 Get a number <0408> * If we get here, only one number has <0409> * been entered so just return <0410> 7A0D 00 RTN <0411> * <0412> 7A0E 8E,08 CKLIST CZ @VARC Limit check to LIST <0413> 7A10 58,4B BR ERRSY <0414> 7A12 D6,42,3A CEQ COLON,@CHAT Record length 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0063 EDIT-359 <0415> 7A15 5A,30 BR CKLI01 No <0416> 7A17 93,2C DDEC @PGMPTR Back up to last CHAT <0417> 7A19 0F,79 XML PGMCHR Get it <0418> 7A1B 8E,42 CZ @CHAT File specified? <0419> 7A1D 78,4B BS ERRSY No, error out <0420> 7A1F C7,14,00 DCH >FF,@CURLIN Number OK? 7A22 FF <0421> 7A23 78,4E BS ERRBL No, indicate an error <0422> 7A25 BC,64,15 ST @CURLIN+1,@XSTLN Everything OK <0423> 7A28 87,14 DCLR @CURLIN Set up to get range <0424> 7A2A BE,08,2D ST DASH,@VARC <0425> 7A2D 05,65,7E B AUTO3 Get range and return <0426> 7A30 D6,42,2D CKLI01 CEQ DASH,@CHAT Better be a dash! <0427> 7A33 58,4B BR ERRSY Nope <0428> 7A35 05,65,9A B AUTO5 Finish up <0429> *********************************************************** <0430> 7A38 D6,75,93 CTRLS CEQ 147,@RKEY CTRL S <0431> 7A3B 5A,42 BR CTRLD No, check more <0432> 7A3D BD,61,20 DST @VARW,@ARG5 Force cursor to start <0433> * ARG5 = current position <0434> 7A40 4C,E7 BR RBACK Now process like FCTN S <0435> 7A42 D6,75,84 CTRLD CEQ 132,@RKEY CTRL D <0436> 7A45 5A,4F BR CTRLE No, check more <0437> 7A47 BD,61,2A DST @VARA,@ARG5 Force cursor to end <0438> 7A4A 06,7A,7E CALL SPACES Look for space <0439> 7A4D 4C,E3 BR RFORW Process like FCTN D <0440> 7A4F D6,75,85 CTRLE CEQ 133,@RKEY CTRL E <0441> 7A52 5A,63 BR CTRLX No, check more <0442> 7A54 A7,61,00 DSUB 32,@ARG5 Up one line 7A57 20 <0443> 7A58 C5,20,61 DCH @ARG5,@VARW Check range <0444> 7A5B 4A,A8 BR READZ1 Ok, go on <0445> 7A5D A3,61,00 DADD 32,@ARG5 No, redo 7A60 20 <0446> 7A61 4A,A8 BR READZ1 And continue <0447> 7A63 D6,75,98 CTRLX CEQ 152,@RKEY CTRL X <0448> 7A66 5A,77 BR CTRL Resume where left off <0449> 7A68 A3,61,00 DADD 32,@ARG5 Next line 7A6B 20 <0450> 7A6C C9,2A,61 DCHE @ARG5,@VARA Check range <0451> 7A6F 6A,A8 BS READZ1 Ok, continue <0452> 7A71 A7,61,00 DSUB 32,@ARG5 No, redo 7A74 20 <0453> 7A75 4A,A8 BR READZ1 Now, go on <0454> 7A77 CA,75,20 CTRL CHE >20,@RKEY Control character!!!! <0455> 7A7A 6B,D0 BS G6BD0 <0456> 7A7C 4A,DC BR G6ADC <0457> 7A7E D6,B0,61 SPACES CEQ >80,V*ARG5 SPACE? 7A81 80 <0458> 7A82 5A,88 BR SPACE2 <0459> 7A84 93,61 DDEC @ARG5 <0460> 7A86 5A,7E BR SPACES <0461> 7A88 D6,B0,61 SPACE2 CEQ >7F,V*ARG5 CURSOR? 7A8B 7F <0462> 7A8C 7A,8F BS SPACE3 <0463> 7A8E 00 RTN <0464> 7A8F A7,61,00 SPACE3 DSUB 4,@ARG5 7A92 04 <0465> 7A93 5A,7E BR SPACES <0466> 7A95 4A,86 BR G6A86 <0467> ************************************ <0468> 7A97 B6,80,C2 MYRUN OR >10,@>83C2 QUIT KEY 7A9A 10 <0469> 7A9B BD,04,7E DST @YPT,@VARY Save Row/Col values 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0064 EDIT-359 <0470> 7A9E 04,01 BACK >01 <0471> 7AA0 07,80 ALL >80 <0472> 7AA2 08 FMT <0473> 7AA3 FC,60 SCRO >60 <0474> 7AA5 FE,00 ROW 0 <0475> 7AA7 FF,08 COL 8 <0476> 7AA9 0F,46,49 HTEX 'FIRMWARE CONTROL' 7AAC 52,4D,57 7AAF 41,52,45 7AB2 20,43,4F 7AB5 4E,54,52 7AB8 4F,4C <0477> 7ABA FE,01 ROW 1 <0478> 7ABC FF,00 COL 0 <0479> 7ABE 5F,5F HCHA 32,95 <0480> 7AC0 FE,04 ROW 4 <0481> 7AC2 FF,06 COL 6 ******************* <0482> 7AC4 52,2A HCHA 19,42 * version = 2001 * <0483> 7AC6 FE,04 ROW 4 ******************* <0484> 7AC8 FF,06 COL 6 * R X B * <0485> 7ACA 67,2A VCHA 8,42 * * <0486> 7ACC FE,04 ROW 4 * creator * <0487> 7ACE FF,18 COL 24 * * <0488> 7AD0 67,2A VCHA 8,42 * RICH GILBERTSON * <0489> 7AD2 FE,05 ROW 5 ******************* <0490> 7AD4 FF,08 COL 8 <0491> 7AD6 0D,76,65 HTEX 'version = 2001' 7AD9 72,73,69 7ADC 6F,6E,20 7ADF 3D,20,32 7AE2 30,30,31 <0492> 7AE5 FE,06 ROW 6 <0493> 7AE7 FF,06 COL 6 <0494> 7AE9 52,2A HCHAR 19,42 <0495> 7AEB FE,07 ROW 7 <0496> 7AED FF,0D COL 13 <0497> 7AEF 04,52,20 HTEX 'R X B' 7AF2 58,20,42 <0498> 7AF5 FE,09 ROW 9 <0499> 7AF7 FF,0C COL 12 <0500> 7AF9 06,63,72 HTEX 'creator' 7AFC 65,61,74 7AFF 6F,72 <0501> 7B01 FE,0B ROW 11 <0502> 7B03 FF,08 COL 8 <0503> 7B05 0E,52,49 HTEX 'RICH GILBERTSON' 7B08 43,48,20 7B0B 47,49,4C 7B0E 42,45,52 7B11 54,53,4F 7B14 4E <0504> 7B15 FE,0C ROW 12 <0505> 7B17 FF,06 COL 6 <0506> 7B19 52,2A HCHA 19,42 <0507> 7B1B FB FEND <0508> 7B1C D6,A3,71 CEQ '1',V@LODFLG 7B1F 31 <0509> 7B20 7B,3A BS SCNKEY <0510> 7B22 8E,A3,71 CZ V@LODFLG <0511> 7B25 7B,3A BS SCNKEY <0512> 7B27 D6,A3,71 CEQ >3A,V@LODFLG 7B2A 3A <0513> 7B2B 63,72 BS TOPLEV <0514> 7B2D 03 SCAN 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0065 EDIT-359 <0515> 7B2E D6,75,FF CEQ >FF,@RKEY <0516> 7B31 5C,1A BR LDKEY <0517> 7B33 BC,A8,24 ST V@LODFLG,V@>0824 7B36 A3,71 <0518> 7B38 5C,21 BR SRCHLP <0519> 7B3A 08 SCNKEY FMT <0520> 7B3B FC,60 SCRO >60 <0521> 7B3D FE,0D ROW 13 <0522> 7B3F FF,00 COL 0 <0523> 7B41 1F,3E,3E HTEX '>> press ============= result <<' 7B44 20,70,72 7B47 65,73,73 7B4A 20,3D,3D 7B4D 3D,3D,3D 7B50 3D,3D,3D 7B53 3D,3D,3D 7B56 3D,3D,20 7B59 72,65,73 7B5C 75,6C,74 7B5F 20,3C,3C <0524> 7B62 FE,0F ROW 15 <0525> 7B64 FF,05 COL 5 <0526> 7B66 12,41,4E HTEX 'ANY KEY = DSK#.LOAD' 7B69 59,20,4B 7B6C 45,59,20 7B6F 3D,20,44 7B72 53,4B,23 7B75 2E,4C,4F 7B78 41,44 <0527> 7B7A FE,11 ROW 17 <0528> 7B7C FF,07 COL 7 <0529> 7B7E 11,45,4E HTEX 'ENTER = DSK#.UTIL1' 7B81 54,45,52 7B84 20,3D,20 7B87 44,53,4B 7B8A 23,2E,55 7B8D 54,49,4C 7B90 31 <0530> 7B91 FE,13 ROW 19 <0531> 7B93 FF,03 COL 3 <0532> 7B95 15,28,43 HTEX '(COMMA) , = DSK#.BATCH' 7B98 4F,4D,4D 7B9B 41,29,20 7B9E 2C,20,3D 7BA1 20,44,53 7BA4 4B,23,2E 7BA7 42,41,54 7BAA 43,48 <0533> 7BAC FE,15 ROW 21 <0534> 7BAE FF,03 COL 3 <0535> 7BB0 1B,53,50 HTEX 'SPACE BAR = RXB COMMAND MODE' 7BB3 41,43,45 7BB6 20,42,41 7BB9 52,20,3D 7BBC 20,52,58 7BBF 42,20,43 7BC2 4F,4D,4D 7BC5 41,4E,44 7BC8 20,4D,4F 7BCB 44,45 <0536> 7BCD FE,17 ROW 23 <0537> 7BCF FF,02 COL 2 <0538> 7BD1 1C,28,50 HTEX '(PERIOD) . = EDITOR ASSEMBLER' 7BD4 45,52,49 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0066 EDIT-359 7BD7 4F,44,29 7BDA 20,2E,20 7BDD 3D,20,45 7BE0 44,49,54 7BE3 4F,52,20 7BE6 41,53,53 7BE9 45,4D,42 7BEC 4C,45,52 <0539> 7BEF FB FEND <0540> 7BF0 D7,AF,22 DCEQ >994A,V@>2254 7BF3 54,99,4A <0541> 7BF6 7C,7B BS XBRUN <0542> 7BF8 BF,58,08 DST >0800,@FAC+14 DELAY VALUE 7BFB 00 <0543> 7BFC BF,7E,0F RSCAN DST >0F12,@YPT 7BFF 12 <0544> 7C00 06,7D,24 CALL CBKEY <0545> 7C03 7C,0B BS RSCAN2 <0546> 7C05 93,58 DDEC @FAC+14 <0547> 7C07 7C,21 BS SRCHLP <0548> 7C09 5B,FC BR RSCAN <0549> 7C0B D6,75,0D RSCAN2 CEQ >0D,@RKEY ENTER? <0550> 7C0E 7C,88 BS UTIL1 <0551> 7C10 D6,75,2C CEQ >2C,@RKEY COMMA? <0552> 7C13 7C,D4 BS BATCH <0553> 7C15 D6,75,2E CEQ >2E,@RKEY PERIOD? <0554> 7C18 7C,C0 BS UTIL4 <0555> 7C1A 86,A3,71 LDKEY CLR V@LODFLG <0556> 7C1D BC,A8,24 ST @RKEY,V@>0824 7C20 75 <0557> 7C21 35,01,5F SRCHLP MOVE 351,V@>019F,V@>01A0 7C24 A1,A0,A1 7C27 9F <0558> 7C28 87,AF,22 DCLR V@>2254 Clear flag 7C2B 54 <0559> 7C2C BC,75,A8 ST V@>0824,@RKEY 7C2F 24 <0560> 7C30 08 FMT <0561> 7C31 FC,60 SCRO >60 <0562> 7C33 FE,14 ROW 20 <0563> 7C35 FF,09 COL 9 <0564> 7C37 0D,53,65 HTEX 'Searching ....' 7C3A 61,72,63 7C3D 68,69,6E 7C40 67,20,2E 7C43 2E,2E,2E <0565> 7C46 FE,16 ROW 22 <0566> 7C48 FB FEND <0567> 7C49 86,00 CLR @VAR0 Row=0 <0568> 7C4B BC,4A,A8 ST V@>0820,@FAC Get string length 7C4E 20 <0569> 7C4F CA,4A,20 CHE 32,@FAC Higher 32? <0570> 7C52 7C,5D BS STLFSC Yes <0571> 7C54 BE,00,20 ST 32,@VAR0 Row=32 <0572> 7C57 A4,00,4A SUB @FAC,@VAR0 32-String length <0573> 7C5A E6,00,01 SRL 1,@VAR0 Divide by 2 <0574> 7C5D BC,7F,00 STLFSC ST @VAR0,@XPT Load Column <0575> 7C60 BF,4C,08 DST >0821,@FAC2 String address 7C63 21 <0576> 7C64 BC,00,B0 DLOOP ST V*FAC2,@VAR0 Character 7C67 4C <0577> 7C68 A2,00,60 ADD >60,@VAR0 Offset <0578> 7C6B 08 FMT <0579> 7C6C E0 BYTE >E0 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0067 EDIT-359 <0580> 7C6D 00 BYTE >00 <0581> 7C6E FB FEND <0582> 7C6F 91,4C DINC @FAC2 Address+1 <0583> 7C71 92,4A DEC @FAC Count-1 <0584> 7C73 5C,64 BR DLOOP <0585> 7C75 BD,7E,04 DST @VARY,@YPT Restore YPT/XPT <0586> 7C78 05,64,A0 B SZRUNL <0587> 7C7B 35,00,32 XBRUN MOVE 50,V@>2256,V@>0820 7C7E A8,20,AF 7C81 22,56 <0588> 7C83 86,A3,71 CLR V@LODFLG <0589> 7C86 5C,21 BR SRCHLP [0016] *********************************************************** [0017] COPY 'DSK5.MYXB3-H' <0001> ********************************* <0002> 7C88 86,AF,22 UTIL1 CLR V@>2256 7C8B 56 <0003> 7C8C 08 FMT <0004> 7C8D FF,00 COL 0 <0005> 7C8F FE,0F ROW 15 <0006> 7C91 5F,20 HCHA 32,32 <0007> 7C93 FB FEND <0008> 7C94 86,4A CLR @FAC <0009> 7C96 BF,58,08 DST >0800,@FAC+14 7C99 00 <0010> 7C9A BE,42,35 ST >35,@CHAT <0011> 7C9D BF,7E,11 UTIL2 DST >1112,@YPT 7CA0 12 <0012> 7CA1 06,7D,24 CALL CBKEY <0013> 7CA4 7C,AC BS UTIL3 <0014> 7CA6 93,58 DDEC @FAC+14 <0015> 7CA8 7C,CD BS UTIL5 <0016> 7CAA 5C,9D BR UTIL2 <0017> 7CAC D6,75,0D UTIL3 CEQ >0D,@RKEY ENTER? <0018> 7CAF 7C,9D BS UTIL2 <0019> 7CB1 D6,75,20 CEQ >20,@RKEY SPACE? <0020> 7CB4 7C,1A BS LDKEY <0021> 7CB6 D6,75,2C CEQ >2C,@RKEY COMMA? <0022> 7CB9 7C,D4 BS BATCH <0023> 7CBB D6,75,2E CEQ >2E,@RKEY PERIOD? <0024> 7CBE 7C,D0 BS UTIL6 <0025> 7CC0 31,00,0C UTIL4 MOVE 12,G@EAU1,V@>2256 7CC3 AF,22,56 7CC6 7D,E6 <0026> 7CC8 BC,AF,22 ST @RKEY,V@>225A 7CCB 5A,75 <0027> 7CCD 05,E0,25 UTIL5 B GE025 <0028> 7CD0 86,42 UTIL6 CLR @CHAT <0029> 7CD2 5C,CD BR UTIL5 <0030> ********************************* <0031> 7CD4 35,00,80 BATCH MOVE 128,V@>01E0,V@>01E1 7CD7 A1,E1,A1 7CDA E0 <0032> 7CDB BF,58,08 DST >0800,@FAC+14 LOAD DELAY 7CDE 00 <0033> 7CDF 86,4A CLR @FAC <0034> 7CE1 BF,7E,13 BATCH1 DST >1312,@YPT ROW/COL 7CE4 12 <0035> 7CE5 06,7D,24 CALL CBKEY <0036> 7CE8 7C,F0 BS BATCH2 <0037> 7CEA 93,58 DDEC @FAC+14 <0038> 7CEC 7D,06 BS BATCH3 <0039> 7CEE 5C,E1 BR BATCH1 <0040> 7CF0 D6,75,0D BATCH2 CEQ >0D,@RKEY ENTER? 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0068 EDIT-359 <0041> 7CF3 7B,3A BS SCNKEY <0042> 7CF5 D6,75,20 CEQ >20,@RKEY SPACE? <0043> 7CF8 7B,3A BS SCNKEY <0044> 7CFA D6,75,2C CEQ >2C,@RKEY COMMA? <0045> 7CFD 7C,E1 BS BATCH1 <0046> 7CFF D6,75,2E CEQ >2E,@RKEY PERIOD? <0047> 7D02 7B,3A BS SCNKEY <0048> 7D04 5D,09 BR BATCH4 <0049> 7D06 BE,75,31 BATCH3 ST >31,@RKEY 1 IN RKEY <0050> 7D09 BE,A8,C0 BATCH4 ST >20,V@>08C0 7D0C 20 <0051> 7D0D 35,00,50 MOVE 80,V@>08C0,V@>08C1 7D10 A8,C1,A8 7D13 C0 <0052> 7D14 31,00,14 MOVE 20,G@UBATCH,V@>08C0 7D17 A8,C0,7D 7D1A F2 <0053> 7D1B BC,A8,CD ST @RKEY,V@>08CD 7D1E 75 <0054> 7D1F 86,A3,71 CLR V@LODFLG <0055> 7D22 43,A5 BR SZNEW <0056> ********************************* <0057> 7D24 DA,59,01 CBKEY CLOG >01,@FAC+15 <0058> 7D27 5D,2D BR CBKEY2 <0059> 7D29 C0,4A,7D EX @>837D,@FAC <0060> 7D2C 03 SCAN <0061> 7D2D 01 CBKEY2 RTNC <0062> ********************************* <0063> * RXB USER <0064> * <0065> 7D2E D7,A8,C2 DUSER DCEQ >0900,V@>08C2 PAB there? 7D31 09,00 <0066> 7D33 5D,A0 BR NOUSER No <0067> 7D35 D6,A8,C0 CEQ >02,V@>08C0 READ code? 7D38 02 <0068> 7D39 7D,64 BS RUSER READ file <0069> 7D3B 06,7D,7A CALL UDSR OPEN <0070> 7D3E 00 BYTE >00 <0071> 7D3F 7D,AF BS USEERR <0072> 7D41 BC,56,A8 ST V@>08C1,@>8356 7D44 C1 <0073> 7D45 E6,56,05 SRL 5,@>8356 <0074> 7D48 8E,56 CZ @>8356 <0075> 7D4A 5D,AF BR USEERR <0076> 7D4C BF,20,02 DST NLNADD,@VARW Reset screen address 7D4F E2 <0077> 7D50 87,A9,56 READLP DCLR V@>0956 Clear counter <0078> 7D53 06,7D,7A CALL UDSR READ <0079> 7D56 02 BYTE >02 <0080> 7D57 7D,99 BS CUSER <0081> 7D59 BC,56,A8 ST V@>08C1,@>8356 7D5C C1 <0082> 7D5D E6,56,05 SRL 5,@>8356 <0083> 7D60 8E,56 CZ @>8356 <0084> 7D62 5D,99 BR CUSER <0085> 7D64 BD,76,A9 RUSER DST V@>0956,@>8376 Get counter 7D67 56 <0086> 7D68 D4,A8,C5 CEQ @>8377,V@>08C5 Counter= # bytes 7D6B 77 <0087> 7D6C 7D,50 BS READLP yes <0088> 7D6E 35,00,01 MOVE 1,V@>0900(@>8376),@RKEY 7D71 75,E9,00 7D74 76 <0089> 7D75 91,A9,56 DINC V@>0956 Counter+1 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0069 EDIT-359 <0090> 7D78 5D,C1 BR USERTN done <0091> 7D7A 35,00,1E UDSR MOVE 30,@FAC,V@>03C0 Save FAC 7D7D A3,C0,4A <0092> 7D80 88,56 FETCH @>8356 Get opcode <0093> 7D82 BC,A8,C0 ST @>8356,V@>08C0 7D85 56 <0094> 7D86 BE,A8,C1 ST >14,V@>08C1 File type 7D89 14 <0095> 7D8A BF,56,08 DST >08C9,@>8356 7D8D C9 <0096> 7D8E 06,00,10 CALL LINK <0097> 7D91 08 BYTE >08 <0098> 7D92 35,00,1E MOVE 30,V@>03C0,@FAC Restore FAC 7D95 4A,A3,C0 <0099> 7D98 01 RTNC <0100> 7D99 06,7D,7A CUSER CALL UDSR CLOSE <0101> 7D9C 01 BYTE >01 <0102> 7D9D 06,7D,A4 CALL CLRUSR Clear USER PAB <0103> 7DA0 03 NOUSER SCAN <0104> 7DA1 02,63 RAND 99 <0105> 7DA3 01 RTNC <0106> 7DA4 86,A8,C0 CLRUSR CLR V@>08C0 <0107> 7DA7 35,00,50 MOVE 80,V@>08C0,V@>08C1 7DAA A8,C1,A8 7DAD C0 <0108> 7DAE 00 RTN <0109> 7DAF 06,7D,A4 USEERR CALL CLRUSR <0110> 7DB2 31,00,0E MOVE 14,G@ERRUSE,V@>02E2 7DB5 A2,E2,7E 7DB8 06 <0111> 7DB9 0F,83 XML SCROLL <0112> 7DBB BE,75,0D ST >0D,@RKEY <0113> 7DBE 06,00,36 CALL TONE2 <0114> 7DC1 D4,00,00 USERTN CEQ @VAR0,@VAR0 <0115> 7DC4 01 RTNC <0116> *********************************************************** <0117> 9CEA CHARS EQU >9CEA * GROM ADDRESS FOR CHAR TABLE <0118> 7DC5 BF,4E,9C CHRTBL DST CHARS,@FAC4 7DC8 EA <0119> 7DC9 BF,4A,04 DST >400,@FAC 7DCC 00 <0120> 7DCD 87,B0,4A CHRLP DCLR V*FAC <0121> 7DD0 33,00,07 MOVE 7,G@0(@FAC4),V@1(@FAC) 7DD3 E0,01,4A 7DD6 00,00,4E <0122> 7DD9 A3,4A,00 DADD >0008,@FAC 7DDC 08 <0123> 7DDD A3,4E,00 DADD >0007,@FAC4 7DE0 07 <0124> 7DE1 92,4C DEC @FAC2 <0125> 7DE3 5D,CD BR CHRLP <0126> 7DE5 00 RTN <0127> *********************************************************** <0128> * EDITOR ASSEMBLER <0129> 7DE6 0A,44,53 EAU1 STRI 'DSK1.UTIL1' 7DE9 4B,31,2E 7DEC 55,54,49 7DEF 4C,31 <0130> 7DF1 0D BYTE >0D <0131> * USER PAB & BATCH FILE <0132> 7DF2 00,14,09 UBATCH BYTE 0,>14,9,0,80,0,0,0,0 7DF5 00,50,00 7DF8 00,00,00 <0133> 7DFB 0A,44,53 STRI 'DSK1.BATCH' 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0070 EDIT-359 7DFE 4B,31,2E 7E01 42,41,54 7E04 43,48 <0134> * USER ERROR * <0135> 7E06 8A,80,B5 ERRUSE BYTE 138,128,181,179,165,178,128 7E09 B3,A5,B2 7E0C 80 <0136> 7E0D A5,B2,B2 BYTE 165,178,178,175,178,128,128 7E10 AF,B2,80 7E13 80 <0137> *************************************** <0138> * RXB SEARCH DISK <0139> 7E14 8E,A3,71 MYSRCH CZ V@LODFLG <0140> 7E17 5E,1F BR NXTDSK <0141> 7E19 B2,45,F7 AND >F7,@FLAG <0142> 7E1C 05,63,E0 B G63E0 <0143> 7E1F 90,A3,71 NXTDSK INC V@LODFLG <0144> 7E22 43,A5 BR SZNEW <0145> ************************** <0146> * RXB TURN SEARCH OFF <0147> 7E24 86,A3,71 SCHOFF CLR V@LODFLG <0148> 7E27 05,6A,70 B G6A70 <0149> ************************************** <0150> * MESSAG 'Bytes of Assembly' <0151> 7E2A A2,D9,D4 MESSAG DATA >A2D9,>D4C5,>D380,>CFC6 7E2D C5,D3,80 7E30 CF,C6 <0152> 7E32 80,A1,D3 DATA >80A1,>D3D3,>C5CD,>C2CC 7E35 D3,C5,CD 7E38 C2,CC <0153> 7E3A D9 BYTE >D9 <0154> * AMSMSG 'K AMS ' <0155> 7E3B AB,80,A1 AMSK DATA >AB80,>A1AD,>B380 7E3E AD,B3,80 <0156> * AMSMSG 'BANKS of 4K Pages ' <0157> 7E41 A2,A1,AE AMSP DATA >A2A1,>AEAB,>B380,>CFC6 7E44 AB,B3,80 7E47 CF,C6 <0158> 7E49 80,94,AB DATA >8094,>AB80,>B0C1,>C7C5 7E4C 80,B0,C1 7E4F C7,C5 <0159> 7E51 D3,80 DATA >D380 <0160> *********************************************************** <0161> * CART MOVE 32,G@CPUPGM,@>8300 * Put assembly into fast R <0162> 7E53 BE,4A,FF ST >FF,@FAC * Byte to load and check for <0163> 7E56 0F,F0 XML >F0 * Execute assembly. <0164> 7E58 8E,4A CZ @FAC * Is this a RXB Cartridge? <0165> 7E5A 65,BD BS SZEXIT * No, exit to reset. <0166> 7E5C 00 CART RTN * Yes, continue on. <0167> *********************************************************** <0168> * * CPU PROGRAM FOR >8300 FAST RAM SUBROUTINE FO <0169> 7E5D 83,02 CPUPGM DATA >8302 * CPUPGM DATA >8302 * First addr <0170> 7E5F D8,20 DATA >D820 * MOVB @>834A,@>6FFF * Turn on ba <0171> 7E61 83,4A DATA >834A * <0172> 7E63 6F,FF DATA >6FFF * <0173> 7E65 98,20 DATA >9820 * CB @>834A,@>6FFF * Is it a ca <0174> 7E67 83,4A DATA >834A * <0175> 7E69 6F,FF DATA >6FFF * <0176> 7E6B 13,02 DATA >1302 * JEQ CARTOK * Yes. <0177> 7E6D 04,E0 DATA >04E0 * CLR @>834A * No. <0178> 7E6F 83,4A DATA >834A * <0179> 7E71 D8,20 DATA >D820 * CARTOK MOVB @>834A,@>6000 * Turn on ba <0180> 7E73 83,4A DATA >834A * <0181> 7E75 60,00 DATA >6000 * 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0071 EDIT-359 <0182> 7E77 04,E0 DATA >04E0 * CLR @>837C * Clear for <0183> 7E79 83,7C DATA >837C * <0184> 7E7B 04,5B DATA >045B * RT * Return to <0185> *********************************************************** <0186> * AMS SIZE <0187> 7E7D 87,4A AMSSIZ DCLR @FAC * ISR ADDRESS BUFFER <0188> D0FE ISROFF EQU >D0FE <0189> 7E7F 06,D0,FE CALL ISROFF * >D0FE <0190> D0FA AMSON EQU >D0FA <0191> 7E82 06,D0,FA CALL AMSON * >D0FA <0192> 7E85 BC,56,8F ST @>5FFE,@FAC12 * SAVE >F000 mapper 7E88 DC,FE <0193> 7E8A D6,56,0F CEQ >0F,@FAC12 * Initialized <0194> 7E8D 5E,E6 BR NOAMS * Not Initalized, end SIZE. <0195> 7E8F BF,52,02 DST 512,@FAC8 * PAGE# 7E92 00 <0196> 7E93 BC,54,8F ST @>401E,@FAC10 * SAVE PAGE # 7E96 BD,1E <0197> 7E98 BD,00,8F NXTPG DST @>FFFE,@>8300 * Save bytes 7E9B 7C,FE <0198> 7E9D BC,8F,BD ST @FAC10,@>401E * Pass mode page 7EA0 1E,54 <0199> 7EA2 BF,8F,7C DST >AAAA,@>FFFE * Test bytes 7EA5 FE,AA,AA <0200> 7EA8 D7,8F,7C DCEQ >AAAA,@>FFFE * Test for bytes 7EAB FE,AA,AA <0201> 7EAE 5E,E6 BR NOAMS * No memory <0202> 7EB0 BD,8F,7C DST @>8300,@>FFFE * Restore bytes 7EB3 FE,00 <0203> 7EB5 E7,52,00 DSRL 1,@FAC8 * PAGE # * 2 7EB8 01 <0204> 7EB9 D7,52,00 DCEQ 32,@FAC8 * Largest page # 7EBC 20 <0205> 7EBD 7E,DB BS SHOWIT * Just show it <0206> 7EBF 92,53 DEC @FAC9 * PAGE # -1 <0207> 7EC1 BC,8F,BD ST @FAC9,@>401E * >F000 mapper 7EC4 1E,53 <0208> 7EC6 90,53 INC @FAC9 * PAGE # +1 <0209> 7EC8 BD,00,8F DST @>FFFE,@>8300 * Save bytes 7ECB 7C,FE <0210> 7ECD BF,8F,7C DST >9999,@>FFFE * Test bytes 7ED0 FE,99,99 <0211> 7ED3 D7,8F,7C DCEQ >9999,@>FFFE * Test for bytes 7ED6 FE,99,99 <0212> 7ED9 5E,98 BR NXTPG * Continue loop <0213> 7EDB BF,8F,7C SHOWIT DST >8300,@>FFFE * Restore bytes 7EDE FE,83,00 <0214> 7EE1 BC,8F,BD ST @FAC10,@>401E * Restore PAGE 7EE4 1E,54 <0215> 7EE6 8F,4A NOAMS DCZ @FAC * ISR? <0216> 7EE8 7E,ED BS NOISR * No <0217> D0FC ISRON EQU >D0FC <0218> 7EEA 06,D0,FC CALL ISRON * >D0FC <0219> D0F8 AMSOFF EQU >D0F8 <0220> 7EED 06,D0,F8 NOISR CALL AMSOFF * >D0F8 <0221> 7EF0 D6,56,0F CEQ >0F,@FAC12 <0222> 7EF3 5F,1E BR NOAMS2 <0223> 7EF5 E3,52,00 DSLL 2,@FAC8 * PAGES * 2 = K 7EF8 02 <0224> 7EF9 BD,5E,52 DST @FAC8,@ARG2 * SHOW K <0225> 7EFC 06,69,31 CALL SDISO <0226> 7EFF 31,00,06 MOVE 6,G@AMSK,V@1(@VARW) 7F02 E0,01,20 7F05 7E,3B 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0072 EDIT-359 <0227> 7F07 0F,83 XML SCROLL <0228> 7F09 E7,52,00 DSRL 2,@FAC8 * PAGE /4 7F0C 02 <0229> 7F0D A6,53,11 SUB 17,@FAC9 * PAGES-OS <0230> 7F10 BD,5E,52 DST @FAC8,@ARG2 * SHOW PAGES <0231> 7F13 06,69,31 CALL SDISO <0232> 7F16 31,00,12 MOVE 18,G@AMSP,V@1(@VARW) 7F19 E0,01,20 7F1C 7E,41 <0233> 7F1E 46,21 NOAMS2 BR G6621 <0234> *********************************************************** <0235> END 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0073 EDIT-359 Symbol Table #1 (New,alpha) 834C AAA 8302 AAA1 00CB ABSZ 00A4 ACCEPZ 8302 ACCUM 03AC ACCVRW 00EC ALLZ 7E3B AMSK D0F8 AMSOFF D0FA AMSON 7E41 AMSP 7E7D AMSSIZ 00BB ANDZ 00F9 APPENZ 835D ARG1 8367 ARG11 836B ARG15 836C ARG16 835E ARG2 835F ARG3 8360 ARG4 8361 ARG5 8362 ARG6 8363 ARG7 8364 ARG8 A00A ASC 00DC ASCZ 00CC ATNZ 0032 ATNZZ 00F0 ATZ 657C AUTO1 65AE AUTO2 657E AUTO3 6575 AUTO4 659A AUTO5 648E AUTOLD 6571 AUTON 0008 BACK 8343 BASE 00F1 BASEZ 7CD4 BATCH 7CE1 BATCH1 7CF0 BATCH2 7D06 BATCH3 7D09 BATCH4 8350 BBB 830C BBB1 00EE BEEPZ 0002 BREAK 008E BREAKZ 6D4B BTOP15 038E BUFEND 8346 BUFLEV 038C BUFSRT 830C BYTES 0010 CALDSR 7139 CALENT 830A CALIST 7182 CALL20 716B CALLS 009D CALLZ 7E5C CART 7D24 CBKEY 7D2D CBKEY2 834E CCC 8308 CCC1 8308 CCPADD 8308 CCPADR 8306 CCPPTR 9CEA CHARS 8342 CHAT 715A CHKEND 714F CHKSYN 7DCD CHRLP 6917 CHRTA2 6925 CHRTAB 7DC5 CHRTBL 000D CHRTN 00D6 CHRZZ 830E CHSAV 00C5 CIRCUZ 7A30 CKLI01 7A0E CKLIST 7854 CKOTHR 767F CLEAN 7682 CLEAN1 76A4 CLEANE 76AD CLEANF 76A7 CLEANG 76B1 CLEANS 76B7 CLEANU 00A0 CLOSEZ 0007 CLRLN 7DA4 CLRUSR 8012 CLSALL 0390 CNSTMP 0004 COD 003A COLON 00B5 COLONZ 002C COMMA 00B3 COMMAZ 0070 COMPCT 00B8 CONCZ 03BB CONFLG 713F CONSCN 0081 CONTIN 796C COPY 79BC COPY00 79E3 COPY01 79E9 COPY02 7990 COPY03 7994 COPY04 798E COPY05 00CD COSZ A040 CPUBAS 7E5D CPUPGM 0820 CRNBUF 08BE CRNEND 007F CRUNCH 76BF CSINT 76C1 CSINT2 69B8 CSIZE 7A77 CTRL 7A42 CTRLD 7A4F CTRLE 7A38 CTRLS 7A63 CTRLX 830E CURINC 8314 CURLIN 007E CURSOR 7D99 CUSER 6F8B CVRTLN 0001 CZCLOS 002D DASH 8334 DATA 0093 DATAZ 834C DDD 8354 DDD1 0089 DEFZ 778A DEL 779D DEL01 77CC DELEND 0099 DELETZ A010 DELINK 0087 DELREP 67EC DELTX 8306 DFLTLM 00E9 DIGITZ 008A DIMZ 6FBA DISO 00A2 DISPLZ 6FBD DISPZ1 00C4 DIVIZ 0003 DLETE 7C64 DLOOP 0024 DOLLAR 000A DOWN 6351 DSCLOD 6FD2 DSPCHR 6FCF DSPQUO 8317 DSRFLG 7D2E DUSER 000A DWNARR 7DE6 EAU1 007F EDGECH 66CF EDITLN 66F5 EDITZ1 6740 EDITZ3 6762 EDITZ4 6788 EDITZ5 678C EDITZ6 6795 EDITZ8 D00D EDTZ00 651D EDTZ05 D000 EDTZZ0 8350 EEE 8358 EEE1 0081 ELSEZ 02FE ENDSCR 008B ENDZ 8332 ENLN 730D ENT01 7341 ENT08 7343 ENT09 7357 ENT10 7372 ENT16 7382 ENT22 7392 ENT24 73BB ENT28 73BE ENT29 73F6 ENT30 7409 ENT34 7411 ENT40 742D ENT44 744F ENT50 7469 ENT53 7498 ENT60 749C ENT61 74C2 ENT62 74EB ENT62A 7507 ENT62B 7503 ENT62C 7522 ENT63 7537 ENT63A 753E ENT65 7566 ENT67 75D9 ENT68 75F3 ENT69 7628 ENT69B 7610 ENT69C 761A ENT69D 72FD ENTER 7300 ENTERW 7305 ENTERX 0007 ENTXFL 00BE EQUALZ 00EF ERASEZ 837C ERCODE 6E1B ERPNT5 6E0E ERPRNT 7677 ERRBA 784E ERRBL 6990 ERRBLN 767B ERRBV 655C ERRCC 699A ERRCIP 8322 ERRCOD 766B ERRFNN 7653 ERRIBS 69A4 ERRIVN 038A ERRLN 698C ERRLNF 6994 ERRLTL 7663 ERRMEM 7673 ERRMS 765F ERRMUV 7851 ERRNPP 6980 ERRNQS 6986 ERRNTL 7667 ERRNWF 765B ERROBE 714B ERROLP 00A5 ERRORZ 69A0 ERRPV 63D3 ERRRDY 766F ERRSNS 784B ERRSY 697A ERRSY1 697C ERRSYN 7156 ERRSYX CD77 ERRTAB 7E06 ERRUSE 6A84 ERRZ 6DB8 ERRZ1 6D4E ERRZZ 6D44 ERRZZ4 6D47 ERRZZ5 6DA1 ERRZZR A004 EXEC A00C EXEC1 A00E EXEC6D 8376 EXPZ 00CE EXPZZ 832E EXTRAM 834B FAC1 8354 FAC10 8356 FAC12 8357 FAC13 8358 FAC14 8359 FAC15 835A FAC16 835B FAC17 834C FAC2 834D FAC3 834E FAC4 834F FAC5 8350 FAC6 8351 FAC7 8352 FAC8 8353 FAC9 834E FFF 8356 FFF1 00FA FIXEDZ 8345 FLAG 0002 FNCFLG 8317 FORNET 0009 FORW 008C FORZ 8340 FREPTR 6012 G6012 601C G601C 6383 G6388 63D0 G63D0 63E0 G63E0 6412 G6412 6420 G6420 645B G645B 64BF G64BF 64D5 G64D5 64F9 G64F9 6504 G6504 6540 G6540 654A G654A 658D G658D 65A9 G65A9 65CE G65CE 65DF G65DF 65F7 G65F7 6618 G6618 6621 G6621 6623 G6623 665F G665F 6661 G6661 6677 G6677 6689 G6689 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0074 EDIT-359 66A8 G66A8 66AA G66AA 66B8 G66B8 66F0 G66F0 6714 G6714 6724 G6724 672E G672E 675E G675E 677E G677E 6783 G6783 67C0 G67C0 67C5 G67C5 67DE G67DE 67EA G67EA 6823 G6823 6827 G6827 683E G683E 6864 G6864 6891 G6891 6899 G6899 68B5 G68B5 68C2 G68C2 68D9 G68D9 68E6 G68E6 68F9 G68F9 68FC G68FC 6939 G6939 6A70 G6A70 6A76 G6A76 6A7C G6A7C 6A82 G6A82 6A84 G6A84 6A86 G6A86 6AAE G6AAE 6AB3 G6AB3 6AC5 G6AC5 6AD7 G6AD7 6ADC G6ADC 6AF4 G6AF4 6B04 G6B04 6B2A G6B2A 6B3C G6B3C 6B53 G6B53 6B69 G6B69 6B7A G6B7A 6B86 G6B86 6B8E G6B8E 6B94 G6B94 6B9C G6B9C 6BA6 G6BA6 6BB3 G6BB3 6BC2 G6BC2 6BCF G6BCF 6BD0 G6BD0 6BF0 G6BF0 6C0B G6C0B 6C30 G6C30 6C64 G6C64 6C6B G6C6B 6C88 G6C88 6C8A G6C8A 6C91 G6C91 6CA7 G6CA7 6CAD G6CAD 6CB9 G6CB9 6CC1 G6CC1 6CD5 G6CD5 6CFB G6CFB 6D35 G6D35 6D3C G6D3C 6D74 G6D74 6D87 G6D87 6DAD G6DAD 6DAF G6DAF 6DBF G6DBF 6DD6 G6DD6 6DFD G6DFD 6E4D G6E4D 6E66 G6E66 6E79 G6E79 6E85 G6E85 6EC4 G6EC4 6ECE G6ECE 6ED8 G6ED8 6EF8 G6EF8 6F0A G6F0A 6F17 G6F17 6F1C G6F1C 6F2E G6F2E 6F35 G6F35 6F55 G6F55 6F90 G6F90 6FDE G6FDE 700B G700B 7013 G7013 7031 G7031 703B G703B 7073 G7073 70EB G70EB 710D G710D 7168 G7168 71AE G71AE 71D7 G71D7 720E G720E 7293 G7293 72A4 G72A4 72A8 G72A8 72B5 G72B5 72C4 G72C4 72FB G72FB 732D G732D 73A6 G73A6 73CD G73CD 73EC G73EC 73FB G73FB 7407 G7407 7480 G7480 74A5 G74A5 7548 G7548 7550 G7550 758B G758B 75A8 G75A8 75BF G75BF 75C1 G75C1 75C6 G75C6 75D1 G75D1 7608 G7608 7618 G7618 763D G763D 7698 G7698 76BE G76BE 76E3 G76E3 8024 G8024 008E GDTECT E025 GE025 6850 GETCHR 686A GETLN 686E GETLN2 6845 GETNB 684A GETNB2 7895 GETPA1 78AF GETPA2 7880 GETPA3 7866 GETPAR 0087 GOSUBZ 0086 GOTOZ 0085 GOZ 0085 GREAD 00C0 GREATZ 802A GRMLST 6810 GRSUB1 802C GRSUB2 802E GRSUB3 7A06 GTLIST 689D GTLNER 77E3 GTRAN0 77FE GTRAN1 77F7 GTRAN2 7805 GTRAN3 7815 GTRAN4 781D GTRAN5 7831 GTRAN6 7838 GTRAN7 783E GTRAN8 7835 GTRAN9 77CF GTRANG 008B GVWITE 0086 GWRITE 6828 GWSUB 0006 IFFLAG 0084 IFZ 64EF ILLST 00A3 IMAGEZ 7142 IMPIF 7147 IMPILL 68C3 INITPG 0092 INPUTZ 6730 INSREP 0004 INSRT 8338 INTRIN A018 INTRND 00CF INTZ 0084 IO 833C IOSTRT D0FE ISROFF D0FC ISRON 8374 KEYBD CB00 KEYTAB 68DC KILSYM 7C1A LDKEY 00D5 LENZ 00BF LESSZ 008D LETZ A026 LINK1 00AA LINPUZ 8312 LINUM 8018 LIST 0002 LISTZ 6E7C LLIST 6E9C LLISZ0 6F87 LLISZ1 6EF0 LLISZ2 6F41 LLISZ3 6F5C LLISZ6 6F85 LLISZ7 6FA8 LLISZ9 6EA0 LLIZ12 6EB3 LLIZ15 6EBF LLIZ16 6EE4 LLIZ17 8336 LNBUF 00C9 LNZ 0371 LODFLG 00D0 LOGZ 00B7 LPARZ 8348 LSUBP 00DF MAXZ 0072 MEMCHK 68A6 MEMFLL 68A3 MEMFUL 68BB MEMZ1 8028 MERGE 0008 MERGEZ 7E2A MESSAG FFFE MINUST 00C2 MINUSZ 00E0 MINZ 837A MOTION 78B0 MOVE 78C7 MOVE03 790D MOVE04 790F MOVE05 793E MOVE06 7956 MOVE07 7958 MOVE08 78CC MOVE09 7938 MOVE99 039E MRGPAB 6065 MSG10 629B MSG109 62A6 MSG130 62B0 MSG135 6076 MSG14 6083 MSG16 609C MSG17 60AD MSG19 60BB MSG24 60D2 MSG25 60E4 MSG28 60F9 MSG34 6110 MSG36 611C MSG39 6128 MSG40 6137 MSG43 6148 MSG44 6159 MSG47 616F MSG48 6189 MSG49 6198 MSG51 61AD MSG54 6324 MSG56 61BE MSG57 61CC MSG60 61DB MSG61 62C5 MSG62 61EB MSG67 61FA MSG69 6215 MSG70 622D MSG74 623A MSG78 624D MSG79 6257 MSG81 626F MSG83 627B MSG84 6286 MSG97 6048 MSGBRK 6319 MSGCF 630A MSGCIS 6038 MSGERR 62D3 MSGFRE 6040 MSGFST 6300 MSGGF1 62F0 MSGGFR 62DD MSGSFR 6053 MSGTA 605C MSGWRN 00C3 MULTZ 0088 MVDN 0089 MVUP 7A97 MYRUN 7E14 MYSRCH 6038 MZMSG 6A70 MZPSCN 7759 NEWCMD 0096 NEXTZ 000D NLEN 02E2 NLNADD 8314 NMLEN 830C NMPTR 7EE6 NOAMS 7F1E NOAMS2 7EED NOISR 0374 NOTONE 00BD NOTZ 7DA0 NOUSER 69AA NSIZE 7657 NTLERR 00FD NUMBEZ 0000 NUMBR 00C8 NUMCOZ 00E8 NUMERZ 00C8 NUMZ 7E1F NXTDSK 7E98 NXTPG 0060 OFFSET 8016 OLD 8026 OLD1 03BC OLDTOP 0005 OLDZ 009B ONZ 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0075 EDIT-359 009F OPENZ 0001 OPTFLG 009E OPTIOZ 00BA ORZ 0080 OSPACE 6FA9 OUTLN 6FAC OUTLZ1 00F7 OUTPUZ 801A OUTREC 8304 PABPTR 00FB PERMAZ 0079 PGMCHR 7640 PGMERR 832C PGMPTR 00DD PIZ 00C1 PLUSZ 00D9 POSZ 6FEE PRESCN 8344 PRGFLG 009C PRINTZ 83CE PRTNFN 03B7 PSCFG 0022 QUOTE 8389 RAMFLG 8386 RAMFRE 830A RAMPTR 8384 RAMTOP 8378 RANDOM 0095 RANDOZ 6CE7 RBACK 6AA1 READ00 6AA3 READ01 6C9A READ05 6A98 READL1 6A9E READL2 6A95 READL3 6A8E READLN 7D50 READLP 0097 READZ 6AA8 READZ1 6ACC READZ2 6B22 READZ3 6C68 READZ4 6ACE READZ5 0006 RECALL 08C0 RECBUF 8307 RECLEN 00DE RECZ 0000 REMODE 009A REMZ 76EB RES1 76F9 RES2 7700 RES2A 7733 RES3 7734 RES4 7751 RES4A 774C RES4B 7752 RES5 662D RES6 0006 RESEQZ 0094 RESTOZ CF68 RETNOS 76E7 RETSET 0088 RETURZ 6CE3 RFORW 8375 RKEY 00D7 RNDZ 00B6 RPARZ 00E1 RPTZZ 7BFC RSCAN 7C0B RSCAN2 8388 RSTK 66EC RTNSET 7774 RUNPAT 7785 RUNRET 00A9 RUNZ 7D64 RUSER 0005 SAFLG 8014 SAVE 0388 SAVEVP 0007 SAVEZ D0AF SAVLIN 0384 SBUFLV 701A SCAN 704B SCAN10 70A1 SCAN20 70A4 SCAN22 70A6 SCAN25 70F6 SCAN35 7111 SCAN40 710A SCAN45 712D SCAN50 7133 SCAN55 71BE SCAN67 7252 SCAN86 7283 SCAN88 72CB SCAN90 716A SCANRT 7E24 SCHOFF 007D SCHSYM 70AD SCNDEF 706E SCNDIM 7B3A SCNKEY 707D SCNOPT 008F SCNSMT 0083 SCROLL 6931 SDISO 0003 SEETWO 00D8 SEGZZ 00B4 SEMICZ 00F6 SEQUEZ 666D SEQZ2 66A2 SEQZ3 0386 SEXTRM 0398 SFLAG 00D1 SGNZZ 7EDB SHOWIT 00D2 SINZ 69C1 SIZEAS 00EB SIZEZ 7648 SKPSTR 0396 SLSUBP 831E SMTSRT 7A88 SPACE2 7A8F SPACE3 7A7E SPACES 635C SPCCHR 007E SPEED 0382 SPGMPT 695A SPRINT 00D3 SQRZ A014 SQUISH 7C21 SRCHLP 831C SREF 0082 SSEPZ 039A SSTEMP 039C SSTMP2 8372 STACK 0372 START 00B2 STEPZ 83BD STKMAX 83AF STKMIN 7C5D STLFSC 8330 STLN 0098 STOPZ 8302 STPT 831A STREND 0004 STRFLG 00C7 STRINZ 8318 STRSP 00DB STRZZ 8324 STVSPT 0003 SUBFLG 72D5 SUBNDS 00A8 SUBNDZ 71C2 SUBS 833A SUBTAB 00A7 SUBXTZ 00A1 SUBZ 0376 SYMBOL 833E SYMTAB 0000 SYNCHK 65BA SZBYE 6520 SZCONT 65BD SZEXIT 65BE SZLIST 65C6 SZMERG 63A5 SZNEW 6560 SZNUM 65B7 SZOLD 6625 SZRES 649B SZRUN 64DA SZRUN0 6502 SZRUN1 64EA SZRUN2 651A SZRUN4 64A0 SZRUNL 65AF SZSAVE 65C9 SZSIZE 0392 TABSAV 00FC TABZ 00D4 TANZ 00B0 THENZ 8379 TIMER 0034 TONE1 0036 TONE2 63D3 TOPL02 63D7 TOPL05 63DA TOPL10 63DD TOPL15 63E6 TOPL20 63E9 TOPL25 6405 TOPL30 641E TOPL35 6433 TOPL42 6445 TOPL45 6462 TOPL55 6372 TOPLEV 8310 TOPSTK 00B1 TOZ CE1F TRACBK 0090 TRACEZ 0083 TREMZ 00EA UALPHZ 7DF2 UBATCH 7D7A UDSR 008F UNBREZ 00C8 UNQSTZ 0091 UNTRAZ 000B UPARR 00F8 UPDATZ 000B UPMV 7DAF USEERR 633B USER 7DC1 USERTN 00ED USINGZ 7C88 UTIL1 7C9D UTIL2 7CAC UTIL3 7CC0 UTIL4 7CCD UTIL5 7CD0 UTIL6 00DA VAL 03B2 VALIDL 03B0 VALIDP 00FE VALIDZ 6C10 VALIZ1 6C1A VALIZ2 6C24 VALIZ3 6C2A VALIZ4 6C3A VALIZ9 8300 VAR0 8316 VAR9 832A VARA 8308 VARC 8301 VARV 8320 VARW 8304 VARY 8306 VARY2 636C VDPREG 837B VDPSTS 008A VGWITE 0078 VPOP 0077 VPUSH 0958 VRAMVS 00A6 WARNZ 6CFD WARNZZ 64F3 WRNNPP 0001 WRNPRT 0002 WRNSTP 6D1B WRNZZ3 6D32 WRNZZ5 7C7B XBRUN 836A XCURIN 8368 XCURLI 8366 XENLN 8316 XFLAG 00BC XORZ 8364 XSTLN 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0076 EDIT-359 Symbol Table #2 (New,value) 0000 NUMBR 0000 REMODE 0000 SYNCHK 0001 CZCLOS 0001 OPTFLG 0001 WRNPRT 0002 BREAK 0002 FNCFLG 0002 LISTZ 0002 WRNSTP 0003 DLETE 0003 SEETWO 0003 SUBFLG 0004 COD 0004 INSRT 0004 STRFLG 0005 OLDZ 0005 SAFLG 0006 IFFLAG 0006 RECALL 0006 RESEQZ 0007 CLRLN 0007 ENTXFL 0007 SAVEZ 0008 BACK 0008 MERGEZ 0009 FORW 000A DOWN 000A DWNARR 000B UPARR 000B UPMV 000D CHRTN 000D NLEN 0010 CALDSR 0022 QUOTE 0024 DOLLAR 002C COMMA 002D DASH 0032 ATNZZ 0034 TONE1 0036 TONE2 003A COLON 0060 OFFSET 0070 COMPCT 0072 MEMCHK 0077 VPUSH 0078 VPOP 0079 PGMCHR 007D SCHSYM 007E CURSOR 007E SPEED 007F CRUNCH 007F EDGECH 0080 OSPACE 0081 CONTIN 0081 ELSEZ 0082 SSEPZ 0083 SCROLL 0083 TREMZ 0084 IFZ 0084 IO 0085 GOZ 0085 GREAD 0086 GOTOZ 0086 GWRITE 0087 DELREP 0087 GOSUBZ 0088 MVDN 0088 RETURZ 0089 DEFZ 0089 MVUP 008A DIMZ 008A VGWITE 008B ENDZ 008B GVWITE 008C FORZ 008D LETZ 008E BREAKZ 008E GDTECT 008F SCNSMT 008F UNBREZ 0090 TRACEZ 0091 UNTRAZ 0092 INPUTZ 0093 DATAZ 0094 RESTOZ 0095 RANDOZ 0096 NEXTZ 0097 READZ 0098 STOPZ 0099 DELETZ 009A REMZ 009B ONZ 009C PRINTZ 009D CALLZ 009E OPTIOZ 009F OPENZ 00A0 CLOSEZ 00A1 SUBZ 00A2 DISPLZ 00A3 IMAGEZ 00A4 ACCEPZ 00A5 ERRORZ 00A6 WARNZ 00A7 SUBXTZ 00A8 SUBNDZ 00A9 RUNZ 00AA LINPUZ 00B0 THENZ 00B1 TOZ 00B2 STEPZ 00B3 COMMAZ 00B4 SEMICZ 00B5 COLONZ 00B6 RPARZ 00B7 LPARZ 00B8 CONCZ 00BA ORZ 00BB ANDZ 00BC XORZ 00BD NOTZ 00BE EQUALZ 00BF LESSZ 00C0 GREATZ 00C1 PLUSZ 00C2 MINUSZ 00C3 MULTZ 00C4 DIVIZ 00C5 CIRCUZ 00C7 STRINZ 00C8 NUMCOZ 00C8 NUMZ 00C8 UNQSTZ 00C9 LNZ 00CB ABSZ 00CC ATNZ 00CD COSZ 00CE EXPZZ 00CF INTZ 00D0 LOGZ 00D1 SGNZZ 00D2 SINZ 00D3 SQRZ 00D4 TANZ 00D5 LENZ 00D6 CHRZZ 00D7 RNDZ 00D8 SEGZZ 00D9 POSZ 00DA VAL 00DB STRZZ 00DC ASCZ 00DD PIZ 00DE RECZ 00DF MAXZ 00E0 MINZ 00E1 RPTZZ 00E8 NUMERZ 00E9 DIGITZ 00EA UALPHZ 00EB SIZEZ 00EC ALLZ 00ED USINGZ 00EE BEEPZ 00EF ERASEZ 00F0 ATZ 00F1 BASEZ 00F6 SEQUEZ 00F7 OUTPUZ 00F8 UPDATZ 00F9 APPENZ 00FA FIXEDZ 00FB PERMAZ 00FC TABZ 00FD NUMBEZ 00FE VALIDZ 02E2 NLNADD 02FE ENDSCR 0371 LODFLG 0372 START 0374 NOTONE 0376 SYMBOL 0382 SPGMPT 0384 SBUFLV 0386 SEXTRM 0388 SAVEVP 038A ERRLN 038C BUFSRT 038E BUFEND 0390 CNSTMP 0392 TABSAV 0396 SLSUBP 0398 SFLAG 039A SSTEMP 039C SSTMP2 039E MRGPAB 03AC ACCVRW 03B0 VALIDP 03B2 VALIDL 03B7 PSCFG 03BB CONFLG 03BC OLDTOP 0820 CRNBUF 08BE CRNEND 08C0 RECBUF 0958 VRAMVS 6012 G6012 601C G601C 6038 MSGERR 6038 MZMSG 6040 MSGFST 6048 MSGBRK 6053 MSGTA 605C MSGWRN 6065 MSG10 6076 MSG14 6083 MSG16 609C MSG17 60AD MSG19 60BB MSG24 60D2 MSG25 60E4 MSG28 60F9 MSG34 6110 MSG36 611C MSG39 6128 MSG40 6137 MSG43 6148 MSG44 6159 MSG47 616F MSG48 6189 MSG49 6198 MSG51 61AD MSG54 61BE MSG57 61CC MSG60 61DB MSG61 61EB MSG67 61FA MSG69 6215 MSG70 622D MSG74 623A MSG78 624D MSG79 6257 MSG81 626F MSG83 627B MSG84 6286 MSG97 629B MSG109 62A6 MSG130 62B0 MSG135 62C5 MSG62 62D3 MSGFRE 62DD MSGSFR 62F0 MSGGFR 6300 MSGGF1 630A MSGCIS 6319 MSGCF 6324 MSG56 633B USER 6351 DSCLOD 635C SPCCHR 636C VDPREG 6372 TOPLEV 6383 G6388 63A5 SZNEW 63D0 G63D0 63D3 ERRRDY 63D3 TOPL02 63D7 TOPL05 63DA TOPL10 63DD TOPL15 63E0 G63E0 63E6 TOPL20 63E9 TOPL25 6405 TOPL30 6412 G6412 641E TOPL35 6420 G6420 6433 TOPL42 6445 TOPL45 645B G645B 6462 TOPL55 648E AUTOLD 649B SZRUN 64A0 SZRUNL 64BF G64BF 64D5 G64D5 64DA SZRUN0 64EA SZRUN2 64EF ILLST 64F3 WRNNPP 64F9 G64F9 6502 SZRUN1 6504 G6504 651A SZRUN4 651D EDTZ05 6520 SZCONT 6540 G6540 654A G654A 655C ERRCC 6560 SZNUM 6571 AUTON 6575 AUTO4 657C AUTO1 657E AUTO3 658D G658D 659A AUTO5 65A9 G65A9 65AE AUTO2 65AF SZSAVE 65B7 SZOLD 65BA SZBYE 65BD SZEXIT 65BE SZLIST 65C6 SZMERG 65C9 SZSIZE 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0077 EDIT-359 65CE G65CE 65DF G65DF 65F7 G65F7 6618 G6618 6621 G6621 6623 G6623 6625 SZRES 662D RES6 665F G665F 6661 G6661 666D SEQZ2 6677 G6677 6689 G6689 66A2 SEQZ3 66A8 G66A8 66AA G66AA 66B8 G66B8 66CF EDITLN 66EC RTNSET 66F0 G66F0 66F5 EDITZ1 6714 G6714 6724 G6724 672E G672E 6730 INSREP 6740 EDITZ3 675E G675E 6762 EDITZ4 677E G677E 6783 G6783 6788 EDITZ5 678C EDITZ6 6795 EDITZ8 67C0 G67C0 67C5 G67C5 67DE G67DE 67EA G67EA 67EC DELTX 6810 GRSUB1 6823 G6823 6827 G6827 6828 GWSUB 683E G683E 6845 GETNB 684A GETNB2 6850 GETCHR 6864 G6864 686A GETLN 686E GETLN2 6891 G6891 6899 G6899 689D GTLNER 68A3 MEMFUL 68A6 MEMFLL 68B5 G68B5 68BB MEMZ1 68C2 G68C2 68C3 INITPG 68D9 G68D9 68DC KILSYM 68E6 G68E6 68F9 G68F9 68FC G68FC 6917 CHRTA2 6925 CHRTAB 6931 SDISO 6939 G6939 695A SPRINT 697A ERRSY1 697C ERRSYN 6980 ERRNQS 6986 ERRNTL 698C ERRLNF 6990 ERRBLN 6994 ERRLTL 699A ERRCIP 69A0 ERRPV 69A4 ERRIVN 69AA NSIZE 69B8 CSIZE 69C1 SIZEAS 6A70 G6A70 6A70 MZPSCN 6A76 G6A76 6A7C G6A7C 6A82 G6A82 6A84 ERRZ 6A84 G6A84 6A86 G6A86 6A8E READLN 6A95 READL3 6A98 READL1 6A9E READL2 6AA1 READ00 6AA3 READ01 6AA8 READZ1 6AAE G6AAE 6AB3 G6AB3 6AC5 G6AC5 6ACC READZ2 6ACE READZ5 6AD7 G6AD7 6ADC G6ADC 6AF4 G6AF4 6B04 G6B04 6B22 READZ3 6B2A G6B2A 6B3C G6B3C 6B53 G6B53 6B69 G6B69 6B7A G6B7A 6B86 G6B86 6B8E G6B8E 6B94 G6B94 6B9C G6B9C 6BA6 G6BA6 6BB3 G6BB3 6BC2 G6BC2 6BCF G6BCF 6BD0 G6BD0 6BF0 G6BF0 6C0B G6C0B 6C10 VALIZ1 6C1A VALIZ2 6C24 VALIZ3 6C2A VALIZ4 6C30 G6C30 6C3A VALIZ9 6C64 G6C64 6C68 READZ4 6C6B G6C6B 6C88 G6C88 6C8A G6C8A 6C91 G6C91 6C9A READ05 6CA7 G6CA7 6CAD G6CAD 6CB9 G6CB9 6CC1 G6CC1 6CD5 G6CD5 6CE3 RFORW 6CE7 RBACK 6CFB G6CFB 6CFD WARNZZ 6D1B WRNZZ3 6D32 WRNZZ5 6D35 G6D35 6D3C G6D3C 6D44 ERRZZ4 6D47 ERRZZ5 6D4B BTOP15 6D4E ERRZZ 6D74 G6D74 6D87 G6D87 6DA1 ERRZZR 6DAD G6DAD 6DAF G6DAF 6DB8 ERRZ1 6DBF G6DBF 6DD6 G6DD6 6DFD G6DFD 6E0E ERPRNT 6E1B ERPNT5 6E4D G6E4D 6E66 G6E66 6E79 G6E79 6E7C LLIST 6E85 G6E85 6E9C LLISZ0 6EA0 LLIZ12 6EB3 LLIZ15 6EBF LLIZ16 6EC4 G6EC4 6ECE G6ECE 6ED8 G6ED8 6EE4 LLIZ17 6EF0 LLISZ2 6EF8 G6EF8 6F0A G6F0A 6F17 G6F17 6F1C G6F1C 6F2E G6F2E 6F35 G6F35 6F41 LLISZ3 6F55 G6F55 6F5C LLISZ6 6F85 LLISZ7 6F87 LLISZ1 6F8B CVRTLN 6F90 G6F90 6FA8 LLISZ9 6FA9 OUTLN 6FAC OUTLZ1 6FBA DISO 6FBD DISPZ1 6FCF DSPQUO 6FD2 DSPCHR 6FDE G6FDE 6FEE PRESCN 700B G700B 7013 G7013 701A SCAN 7031 G7031 703B G703B 704B SCAN10 706E SCNDIM 7073 G7073 707D SCNOPT 70A1 SCAN20 70A4 SCAN22 70A6 SCAN25 70AD SCNDEF 70EB G70EB 70F6 SCAN35 710A SCAN45 710D G710D 7111 SCAN40 712D SCAN50 7133 SCAN55 7139 CALENT 713F CONSCN 7142 IMPIF 7147 IMPILL 714B ERROLP 714F CHKSYN 7156 ERRSYX 715A CHKEND 7168 G7168 716A SCANRT 716B CALLS 7182 CALL20 71AE G71AE 71BE SCAN67 71C2 SUBS 71D7 G71D7 720E G720E 7252 SCAN86 7283 SCAN88 7293 G7293 72A4 G72A4 72A8 G72A8 72B5 G72B5 72C4 G72C4 72CB SCAN90 72D5 SUBNDS 72FB G72FB 72FD ENTER 7300 ENTERW 7305 ENTERX 730D ENT01 732D G732D 7341 ENT08 7343 ENT09 7357 ENT10 7372 ENT16 7382 ENT22 7392 ENT24 73A6 G73A6 73BB ENT28 73BE ENT29 73CD G73CD 73EC G73EC 73F6 ENT30 73FB G73FB 7407 G7407 7409 ENT34 7411 ENT40 742D ENT44 744F ENT50 7469 ENT53 7480 G7480 7498 ENT60 749C ENT61 74A5 G74A5 74C2 ENT62 74EB ENT62A 7503 ENT62C 7507 ENT62B 7522 ENT63 7537 ENT63A 753E ENT65 7548 G7548 7550 G7550 7566 ENT67 758B G758B 75A8 G75A8 75BF G75BF 75C1 G75C1 75C6 G75C6 75D1 G75D1 75D9 ENT68 75F3 ENT69 7608 G7608 7610 ENT69C 7618 G7618 761A ENT69D 7628 ENT69B 763D G763D 7640 PGMERR 7648 SKPSTR 7653 ERRIBS 7657 NTLERR 765B ERROBE 765F ERRMUV 7663 ERRMEM 7667 ERRNWF 766B ERRFNN 766F ERRSNS 7673 ERRMS 7677 ERRBA 767B ERRBV 767F CLEAN 7682 CLEAN1 7698 G7698 76A4 CLEANE 76A7 CLEANG 76AD CLEANF 76B1 CLEANS 76B7 CLEANU 76BE G76BE 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0078 EDIT-359 76BF CSINT 76C1 CSINT2 76E3 G76E3 76E7 RETSET 76EB RES1 76F9 RES2 7700 RES2A 7733 RES3 7734 RES4 774C RES4B 7751 RES4A 7752 RES5 7759 NEWCMD 7774 RUNPAT 7785 RUNRET 778A DEL 779D DEL01 77CC DELEND 77CF GTRANG 77E3 GTRAN0 77F7 GTRAN2 77FE GTRAN1 7805 GTRAN3 7815 GTRAN4 781D GTRAN5 7831 GTRAN6 7835 GTRAN9 7838 GTRAN7 783E GTRAN8 784B ERRSY 784E ERRBL 7851 ERRNPP 7854 CKOTHR 7866 GETPAR 7880 GETPA3 7895 GETPA1 78AF GETPA2 78B0 MOVE 78C7 MOVE03 78CC MOVE09 790D MOVE04 790F MOVE05 7938 MOVE99 793E MOVE06 7956 MOVE07 7958 MOVE08 796C COPY 798E COPY05 7990 COPY03 7994 COPY04 79BC COPY00 79E3 COPY01 79E9 COPY02 7A06 GTLIST 7A0E CKLIST 7A30 CKLI01 7A38 CTRLS 7A42 CTRLD 7A4F CTRLE 7A63 CTRLX 7A77 CTRL 7A7E SPACES 7A88 SPACE2 7A8F SPACE3 7A97 MYRUN 7B3A SCNKEY 7BFC RSCAN 7C0B RSCAN2 7C1A LDKEY 7C21 SRCHLP 7C5D STLFSC 7C64 DLOOP 7C7B XBRUN 7C88 UTIL1 7C9D UTIL2 7CAC UTIL3 7CC0 UTIL4 7CCD UTIL5 7CD0 UTIL6 7CD4 BATCH 7CE1 BATCH1 7CF0 BATCH2 7D06 BATCH3 7D09 BATCH4 7D24 CBKEY 7D2D CBKEY2 7D2E DUSER 7D50 READLP 7D64 RUSER 7D7A UDSR 7D99 CUSER 7DA0 NOUSER 7DA4 CLRUSR 7DAF USEERR 7DC1 USERTN 7DC5 CHRTBL 7DCD CHRLP 7DE6 EAU1 7DF2 UBATCH 7E06 ERRUSE 7E14 MYSRCH 7E1F NXTDSK 7E24 SCHOFF 7E2A MESSAG 7E3B AMSK 7E41 AMSP 7E5C CART 7E5D CPUPGM 7E7D AMSSIZ 7E98 NXTPG 7EDB SHOWIT 7EE6 NOAMS 7EED NOISR 7F1E NOAMS2 8012 CLSALL 8014 SAVE 8016 OLD 8018 LIST 801A OUTREC 8024 G8024 8026 OLD1 8028 MERGE 802A GRMLST 802C GRSUB2 802E GRSUB3 8300 VAR0 8301 VARV 8302 AAA1 8302 ACCUM 8302 STPT 8304 PABPTR 8304 VARY 8306 CCPPTR 8306 DFLTLM 8306 VARY2 8307 RECLEN 8308 CCC1 8308 CCPADD 8308 CCPADR 8308 VARC 830A CALIST 830A RAMPTR 830C BBB1 830C BYTES 830C NMPTR 830E CHSAV 830E CURINC 8310 TOPSTK 8312 LINUM 8314 CURLIN 8314 NMLEN 8316 VAR9 8316 XFLAG 8317 DSRFLG 8317 FORNET 8318 STRSP 831A STREND 831C SREF 831E SMTSRT 8320 VARW 8322 ERRCOD 8324 STVSPT 832A VARA 832C PGMPTR 832E EXTRAM 8330 STLN 8332 ENLN 8334 DATA 8336 LNBUF 8338 INTRIN 833A SUBTAB 833C IOSTRT 833E SYMTAB 8340 FREPTR 8342 CHAT 8343 BASE 8344 PRGFLG 8345 FLAG 8346 BUFLEV 8348 LSUBP 834B FAC1 834C AAA 834C DDD 834C FAC2 834D FAC3 834E CCC 834E FAC4 834E FFF 834F FAC5 8350 BBB 8350 EEE 8350 FAC6 8351 FAC7 8352 FAC8 8353 FAC9 8354 DDD1 8354 FAC10 8356 FAC12 8356 FFF1 8357 FAC13 8358 EEE1 8358 FAC14 8359 FAC15 835A FAC16 835B FAC17 835D ARG1 835E ARG2 835F ARG3 8360 ARG4 8361 ARG5 8362 ARG6 8363 ARG7 8364 ARG8 8364 XSTLN 8366 XENLN 8367 ARG11 8368 XCURLI 836A XCURIN 836B ARG15 836C ARG16 8372 STACK 8374 KEYBD 8375 RKEY 8376 EXPZ 8378 RANDOM 8379 TIMER 837A MOTION 837B VDPSTS 837C ERCODE 8384 RAMTOP 8386 RAMFRE 8388 RSTK 8389 RAMFLG 83AF STKMIN 83BD STKMAX 83CE PRTNFN 9CEA CHARS A004 EXEC A00A ASC A00C EXEC1 A00E EXEC6D A010 DELINK A014 SQUISH A018 INTRND A026 LINK1 A040 CPUBAS CB00 KEYTAB CD77 ERRTAB CE1F TRACBK CF68 RETNOS D000 EDTZZ0 D00D EDTZ00 D0AF SAVLIN D0F8 AMSOFF D0FA AMSON D0FC ISRON D0FE ISROFF E025 GE025 FFFE MINUST 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0079 EDIT-359 Symbol Table #4 (Def,alpha) 0034 ACCTON 835C ARG 0032 ATN 0036 BADTON 003B BITREV 0012 CFI 0014 CNS 002C COS 0010 CSN 8372 DATSTK 0001 DIVZER 0003 ERRIOV 0006 ERRLOG 0005 ERRNIP 0002 ERRSNN 0004 ERRSQR 0028 EXP 834A FAC 0006 FADD 000A FCOMP 0009 FDIV 0008 FMUL 836C FPERAD 0007 FSUB 0038 GETSPACE 0022 INT 0010 LINK 0018 LOCASE 002A LOG 8370 MEMSIZ 003D NAMLNK 8300 PAD 0024 PWR 0012 RETURN 000B SADD 000F SCOMP 000E SDIV 8375 SGN 002E SIN 000D SMUL 8400 SOUND 0026 SQR 000C SSUB 837C STATUS 0016 STCASE 8373 SUBSTK 0030 TAN 0007 TRIGER 004A UPCASE 836E VSPTR 0001 WRNOV 837F XPT 837E YPT 99/4 GPL-ASSEMBLER (Pass 3) correct PAGE 0080 EDIT-359 Symbol Table #8 (Def,value) 0001 DIVZER 0001 WRNOV 0002 ERRSNN 0003 ERRIOV 0004 ERRSQR 0005 ERRNIP 0006 ERRLOG 0006 FADD 0007 FSUB 0007 TRIGER 0008 FMUL 0009 FDIV 000A FCOMP 000B SADD 000C SSUB 000D SMUL 000E SDIV 000F SCOMP 0010 CSN 0010 LINK 0012 CFI 0012 RETURN 0014 CNS 0016 STCASE 0018 LOCASE 0022 INT 0024 PWR 0026 SQR 0028 EXP 002A LOG 002C COS 002E SIN 0030 TAN 0032 ATN 0034 ACCTON 0036 BADTON 0038 GETSPACE 003B BITREV 003D NAMLNK 004A UPCASE 8300 PAD 834A FAC 835C ARG 836C FPERAD 836E VSPTR 8370 MEMSIZ 8372 DATSTK 8373 SUBSTK 8375 SGN 837C STATUS 837E YPT 837F XPT 8400 SOUND [0][5][0][24][0] [0][3][0][14][0] [0][30][0][29][0] [0][28][0][19][0][18][0][0][16][0][27][0][25][0][22][0][0][8][0][9][0][21][0][4] [0][23][0][7][0][20][0][17][0][2][0][15][0][31][0][0][0][0][0][0][0][0][0][0][0][0] UBPGMFNDR[0][0][1][0][0][3]S[0][0][0][0][0][0][0][0][0][0][0]" [0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0] IAG [0][0][1][0][0][1][228][0][0][0][0][0][0][0][0][0][0][0]%[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0]