# File size: 16384 # Specific Z80 CPU code detected # Microsoft 8080/Z80 BASIC found # Extended syntax detected (classic version) # Double precision maths detected # Microsoft signature not found BASTXT = $40A4 ; BASIC program start ptr (aka TXTTAB) # CPDEHL (compare DE and HL), code found at $1C8F INPORT = $4094 ; Current port for 'INP' function OTPORT = $4097 ; Current port for 'OUT' statement TMSTPT = $40B3 ; Temporary string pool pointer TMPSTR = $40D3 ; Temporary string NXTOPR = $40F3 ; Address ptr to next operator PROGND = $40F9 ; BASIC program end ptr (aka VARTAB) VAREND = $40FB ; End of variables ARREND = $40FD ; End of arrays (lowest free mem) SGNRES = $4125 ; Sign of result DIMFLG = $40AE ; (word), aka LCRFLG (Locate/Create and Type SAVTXT = $40E6 ; (word), prg pointer for resume TEMPST = $40B5 ; (word), temporary descriptors TEMPPT = $40B3 ; (word), start of free area of temporary descriptor CURLIN = $40A2 ; (word), line number being interpreted OLDLIN = $40F5 ; (word), old line number set up ^C ... SAVTXT = $40E6 ; (word), prg pointer for resume OLDTXT = $40F7 ; (word), prg pointer for CONT HALFPI = $158B ; Half PI constant ptr HALF = $1380 ; Constant ptr for 0.5 in FP UNITY = $07F8 ; Constant ptr for number 1 in FP LOGTAB = $07FC ; Table used by LOG FPREG = $4121 ; Floating Point Register (FACCU, FACLOW on Ext. BASIC) LAST_FPREG = $4123 ; Last byte in Single Precision FP Register (+sign bit) FPEXP = $4124 ; Floating Point Exponent DBL_FPREG = $4121 ; Double Precision Floating Point Register (aka FACLOW) DBL_LAST_FPREG = $412D ; Last byte in Double Precision FP register (+sign bit) CPDEHL = $1C90 ; compare DE and HL (aka DCOMPR) FNDNUM = $2B1B ; Load 'A' with the next number in BASIC program GETINT = $2B1C ; Get a number to 'A' GETWORD = $2B02 ; Get a number to DE (0..65535) DEPINT = $2B05 ; Get integer variable to DE, error if negative FPSINT = $2B01 ; Get subscript SBSCPT = $26E9 ; Sort out subscript SCPTLP = $26EF ; SBSCPT loop GETVAR = $260D ; Get variable address to DE CHKSTK = $1963 ; Check for C levels of stack OPRND = $249F ; Get next expression value SYNCHR = $0008 ; Check syntax, 1 byte follows to be compared LFRGNM = $2ADF ; number in program listing and check for ending ')' HLPASS = $0AD2 ; Get back from function passing an INT value HL MIDNUM = $2AE2 ; Get number in program listing INT_RESULT_A = $098D ; Get back from function, result in A (signed) GETYPR = $0020 ; Test number FAC type (Precision mode, etc..) TSTSGN = $0955 ; Test sign of FPREG _TSTSGN = $0994 ; Test sign in number INVSGN = $0982 ; Invert number sign STAKFP = $09A4 ; Put FP value on stack NEGAFT = $13E2 ; Negate number LOG = $0809 ; LOG SQR = $13E7 ; SQR POWER = $13F2 ; POWER EXP = $1439 ; EXP COS = $1541 ; COS SIN = $1547 ; SIN TAN = $15A8 ; TAN ATN = $15BD ; ATN ABS = $0977 ; ATN DBL_ABS = $0C5B ; ABS (double precision BASIC variant) SUBCDE = $0713 ; Subtract BCDE from FP reg FPADD = $0716 ; Add BCDE to FP reg SCALE = $07D7 ; Scale number in BCDE for A exponent (bits) PLUCDE = $07B7 ; Add number pointed by HL to CDE COMPL = $07C3 ; Convert a negative number to positive PHLTFP = $09B1 ; Number at HL to BCDE FPBCDE = $09B4 ; Move BCDE to FPREG ADDPHL = $070B ; ADD number at HL to BCDE SUBPHL = $0710 ; SUBTRACT number at HL from BCDE MLSP10 = $093E ; Multiply number in FPREG by 10 FPMULT = $0847 ; Multiply BCDE to FP reg DIV10 = $0897 ; Divide FP by 10 DIV = $08A0 ; Divide FP by number on stack DVBCDE = $08A2 ; Divide FP by BCDE DCBCDE = $0B1F ; Decrement FP value in BCDE BCDEFP = $09BF ; Load FP reg to BCDE LOADFP = $09C2 ; Load FP value pointed by HL to BCDE SHRITE = $07E4 ; Shift right number in BCDE CMPNUM = $0A0C ; Compare FP reg to BCDE FPINT = $0AFB ; Floating Point to Integer FLGREL = $0964 ; CY and A to FP, & normalise SUMSER = $149A ; Evaluate sum of series INT = $0B40 ; INT DBL_INT = $0B37 ; INT (double precision BASIC variant) DBL_SUB = $0C70 ; Double precision SUB (formerly SUBCDE) DBL_ADD = $0C77 ; Double precision ADD (formerly FPADD) DBL_MUL = $0DA1 ; Double precision MULTIPLY DBL_DIV = $0DE5 ; Double precision DIVIDE FIX = $0B26 ; Double Precision to Integer conversion INT_MUL = $0BF2 ; Integer MULTIPLY MLDEBC = $0BAA ; Multiply DE by BC ASCTFP = $0E6C ; ASCII to FP number (New version) DBL_ASCTFP = $0E65 ; ASCII to Double precision FP number PRNUMS = $28A6 ; Print number string PRS = $28A7 ; Create string entry and print it PRS1 = $28AA ; Print string at HL STR = $2836 ; STR BASIC function entry SAVSTR = $283F ; Save string in string area MKTMST = $2857 ; Make temporary string CRTMST = $285A ; Create temporary string entry SSTSA = $29C6 ; Move string on stack to string area TOSTRA = $29CE ; Move string in BC, (len in L) to string area TSALP = $29CF ; TOSTRA loop FOR = $1CA1 ; 'FOR' BASIC instruction FDTLP = $2296 ; Find next DATA statement DATA = $1F05 ; DATA statement: find next DATA program line.. CHR = $2A1F ; CHR$ BASIC function MAKINT = $2B1F ; Convert tmp string to int in A register CONCAT = $298F ; String concatenation TESTR = $28BF ; Test if enough room for string TOPOOL = $2A2B ; Save in string pool TSTOPL = $2884 ; Temporary string to pool OPNPAR = $2335 ; Chk Syntax, make sure '(' follows EVAL = $2337 ; a.k.a. GETNUM, evaluate expression EVAL1 = $233A ; Save precedence and eval until precedence break EVAL2 = $2343 ; Evaluate expression until precedence break EVAL3 = $2346 ; Evaluate expression until precedence break EVAL = $2338 ; (a.k.a. GETNUM, evaluate expression (GETNUM) EVAL1 = $233B ; Save precedence and eval until precedence break CRTST = $2865 ; Create String QTSTR = $2866 ; Create quote terminated String DTSTR = $2869 ; Create String, termination char in D GETSTR = $29D7 ; Get string pointed by FPREG 'Type Error' if it is not GSTRCU = $29DA ; Get string pointed by FPREG GSTRHL = $29DD ; Get string pointed by HL GSTRDE = $29DE ; Get string pointed by DE TSTSTR = $0AF4 ; Test a string, 'Type Error' if it is not ATOH = $1E5A ; ASCII to Integer, result in DE LNUM_RANGE = $1B10 ; Read numeric range function parameters LNUM_PARM = $1E4F ; Read numeric function parameter CHRGTB = $1D78 ; (a.k.a. GETCHR, GETNEXT), pick next char from program _CHRGTB = $1D78 ; Pick next char from program RINPUT = $0361 ; Line input OUTC = $032A ; Output char in 'A' to console DATSNR = $1991 ; 'SN err' entry for Input STMT SNERR = $1997 ; entry for '?SN ERROR' FCERR = $1E4A ; entry for '?FC ERROR' # JP table for statements = $1822 # TOKEN table position = $1650, word list in classic encoding mode # -- STATEMENTS -- # --- $1DAE - [128] END $1CA1 - [129] FOR $05E8 - [130] RESET $05DF - [131] SET $3CFC - [132] CLS $4173 - [133] CMD $01D3 - [134] RANDOM $22B6 - [135] NEXT $1F05 - [136] DATA $219A - [137] INPUT $2608 - [138] DIM $21EF - [139] READ $1F21 - [140] LET $1EC2 - [141] GOTO $1EA3 - [142] RUN $2039 - [143] IF $0602 - [144] RESTORE $1EB1 - [145] GOSUB $1EDE - [146] RETURN $1F07 - [147] REM $1DA9 - [148] STOP $1F07 - [149] ELSE $1DF7 - [150] TRON $1DF8 - [151] TROFF $1E00 - [152] DEFSTR $1E03 - [153] DEFINT $1E06 - [154] DEFSNG $1E09 - [155] DEFDBL $0184 - [156] BEEP $2E60 - [157] EDIT $1FF4 - [158] ERROR $1FAF - [159] RESUME $0629 - [160] OUT $1F6C - [161] ON $03C2 - [162] OPEN $417C - [163] FIELD $417F - [164] GET $4182 - [165] PUT $03CE - [166] CLOSE $050F - [167] LOAD $418B - [168] MERGE $059B - [169] TEST $4191 - [170] KILL $03A0 - [171] CREATE $419A - [172] fn $04CD - [173] SAVE $1997 - [174] SCREEN $2067 - [175] LPRINT $415B - [176] DEF $0617 - [177] POKE $206F - [178] PRINT $1DE4 - [179] CONT $2B2E - [180] LIST $2B29 - [181] LLIST $2BC6 - [182] DELETE $2008 - [183] AUTO $1E7A - [184] CLEAR $1997 - [185] CLOAD $1997 - [186] CSAVE $1B49 - [187] NEW # -- OPERATORS & extras -- # 188 TAB( # 189 TO # 190 FN # 191 USING # 192 VARPTR # 193 CALL # 194 ERL # 195 ERR # 196 STRING$ # 197 INSTR # 198 POINT # 199 TIME$ # 200 PI # 201 INKEY$ # 202 THEN # 203 NOT # 204 STEP # 205 + # 206 - # 207 * # 208 / # 209  # 210 AND # 211 OR # 212 > # 213 = # 214 < # JP table for functions = $1608 # -- FUNCTIONS -- $098A - [215] SGN $0B37 - [216] INT $0977 - [217] ABS $27D4 - [218] FRE $2AEF - [219] INP $27F5 - [220] POS $13E7 - [221] SQR $14C9 - [222] RND $0809 - [223] LOG $1439 - [224] EXP $1541 - [225] COS $1547 - [226] SIN $15A8 - [227] TAN $15BD - [228] ATN $2CAA - [229] PEEK $4152 - [230] CVI $4158 - [231] CVS $415E - [232] CVD $4161 - [233] EOF $4164 - [234] LOC $4167 - [235] LOF $416A - [236] MKI$ $416D - [237] MKS$ $4170 - [238] MKD$ $0A7F - [239] CINT $0AB1 - [240] CSNG $0ADB - [241] CDBL $0B26 - [242] FIX $2A03 - [243] LEN $2836 - [244] STR$ $2AC5 - [245] VAL $2A0F - [246] ASC $2A1F - [247] CHR$ $2A61 - [248] LEFT$ $2A91 - [249] RIGHT$ $2A9A - [250] MID$ $4EC5 - [251] '