MSX Basic v2 draft
This commit is contained in:
1 parent
00610b2925
commit
4f26befd74
19 files changed
+19381
-437
No files matched your search
File renamed without changes.
Vendored
+65
@@ -0,0 +1,65 @@
|
|||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"label": "make MB_v5.21 (sjasmplus)",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "sjasmplus",
|
||||||
|
"args": [
|
||||||
|
"--fullpath",
|
||||||
|
"--nofakes",
|
||||||
|
"--i8080",
|
||||||
|
"--sld=mb.sld",
|
||||||
|
"mb.asm"
|
||||||
|
],
|
||||||
|
"options": {
|
||||||
|
"cwd": "v5.21"
|
||||||
|
},
|
||||||
|
"problemMatcher": {
|
||||||
|
"owner": "sjasmplus",
|
||||||
|
"fileLocation": "autoDetect",
|
||||||
|
"pattern": {
|
||||||
|
"regexp": "^(.*)\\((\\d+)\\):\\s+(warning|error):\\s+(.*)$",
|
||||||
|
"file": 1,
|
||||||
|
"line": 2,
|
||||||
|
"severity": 3,
|
||||||
|
"message": 4
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"group": {
|
||||||
|
"kind": "build",
|
||||||
|
"isDefault": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "make MSX Basic v2 (sjasmplus)",
|
||||||
|
"type": "shell",
|
||||||
|
"command": "sjasmplus",
|
||||||
|
"args": [
|
||||||
|
"--fullpath",
|
||||||
|
"--nofakes",
|
||||||
|
"--sld=mb.sld",
|
||||||
|
"mb.asm"
|
||||||
|
],
|
||||||
|
"options": {
|
||||||
|
"cwd": "MSX_v2"
|
||||||
|
},
|
||||||
|
"problemMatcher": {
|
||||||
|
"owner": "sjasmplus",
|
||||||
|
"fileLocation": "autoDetect",
|
||||||
|
"pattern": {
|
||||||
|
"regexp": "^(.*)\\((\\d+)\\):\\s+(warning|error):\\s+(.*)$",
|
||||||
|
"file": 1,
|
||||||
|
"line": 2,
|
||||||
|
"severity": 3,
|
||||||
|
"message": 4
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"group": {
|
||||||
|
"kind": "build",
|
||||||
|
"isDefault": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,518 @@
|
|||||||
|
; ===================================================
|
||||||
|
; Microsoft BASIC v2 for MSX System v3.0
|
||||||
|
;
|
||||||
|
; Operator and function dispatch tables
|
||||||
|
; Disassembled by Romychs @ 2026-09-03
|
||||||
|
; ===================================================
|
||||||
|
|
||||||
|
; ---------------------------------------------------
|
||||||
|
; Operator tokens
|
||||||
|
; ---------------------------------------------------
|
||||||
|
STMDSP:
|
||||||
|
dw MB_ENDS
|
||||||
|
dw MB_FOR
|
||||||
|
dw MB_NEXT
|
||||||
|
dw MB_DATAS
|
||||||
|
dw MB_INPUT
|
||||||
|
dw LB_DIM
|
||||||
|
dw MB_READ
|
||||||
|
dw MB_LET
|
||||||
|
dw MB_GOTO
|
||||||
|
dw MB_RUN
|
||||||
|
dw MB_IFS
|
||||||
|
dw MB_RESTORE
|
||||||
|
dw MB_GOSUB
|
||||||
|
dw MB_RETURN
|
||||||
|
dw MB_REM_ELSE
|
||||||
|
; 0x90..0x9F
|
||||||
|
dw MB_STOP
|
||||||
|
dw MB_PRINT
|
||||||
|
dw MB_CLEAR
|
||||||
|
dw MB_LIST
|
||||||
|
dw MB_NEW
|
||||||
|
dw MB_ONGOTO
|
||||||
|
dw MB_FNWAIT
|
||||||
|
dw MB_DEF
|
||||||
|
dw MB_POKE
|
||||||
|
dw MB_CONT
|
||||||
|
dw MB_CSAVE
|
||||||
|
dw MB_CLOAD
|
||||||
|
dw MB_OUTWRD
|
||||||
|
dw MB_LPRINT
|
||||||
|
dw MB_LLIST
|
||||||
|
dw MB_CLS
|
||||||
|
; 0xA0..0xAF
|
||||||
|
dw MB_WIDTH
|
||||||
|
dw MB_REM_ELSE
|
||||||
|
dw MB_TRON ; = '>'
|
||||||
|
dw MB_TROFF
|
||||||
|
dw MB_SWAP
|
||||||
|
dw MB_ERASE
|
||||||
|
dw MB_ERRORS
|
||||||
|
dw MB_RESUME
|
||||||
|
dw MB_DELETE
|
||||||
|
dw MB_AUTO
|
||||||
|
dw MB_RENUM
|
||||||
|
dw MB_DEFSTR
|
||||||
|
dw MB_DEFINT
|
||||||
|
dw MB_DEFSNG
|
||||||
|
dw MB_DEFDBL
|
||||||
|
dw MB_LINE
|
||||||
|
; 0xB0..0xBF
|
||||||
|
dw MB_OPEN
|
||||||
|
dw MB_FIELD
|
||||||
|
dw MB_GET
|
||||||
|
dw MB_PUT
|
||||||
|
dw MB_CLOSE
|
||||||
|
dw MB_LOAD ; = F6h
|
||||||
|
dw MB_MERGE ; _MERGE
|
||||||
|
dw MB_FILES
|
||||||
|
dw MB_LSET
|
||||||
|
dw MB_RSET
|
||||||
|
dw MB_SAVE
|
||||||
|
dw MB_LFILES
|
||||||
|
dw MB_CIRCLE
|
||||||
|
dw MB_COLOR
|
||||||
|
dw MB_DRAW
|
||||||
|
dw MB_PAINT
|
||||||
|
; 0xC0..0xCF
|
||||||
|
dw BEEP
|
||||||
|
dw MB_PLAY
|
||||||
|
dw MB_PSETST
|
||||||
|
dw MB_PRESET
|
||||||
|
dw MB_SOUND
|
||||||
|
dw MB_SCREEN
|
||||||
|
dw MB_VPOKE
|
||||||
|
dw MB_SPRITE
|
||||||
|
dw MB_VDP
|
||||||
|
dw MB_BASE
|
||||||
|
dw MB_CALL
|
||||||
|
dw MB_TIME
|
||||||
|
dw MB_KEY
|
||||||
|
dw MB_MAX
|
||||||
|
dw MB_MOTOR
|
||||||
|
dw MB_BLOAD
|
||||||
|
; 0xD0..0xDF
|
||||||
|
dw MB_BSAVE
|
||||||
|
dw MB_DSKO
|
||||||
|
dw MB_SET
|
||||||
|
dw MB_NAME
|
||||||
|
dw MB_KILL
|
||||||
|
dw MB_IPL
|
||||||
|
dw MB_COPY
|
||||||
|
dw MB_CMD
|
||||||
|
dw MB_LOCATE
|
||||||
|
|
||||||
|
|
||||||
|
; ---------------------------------------------------
|
||||||
|
; Function tokens
|
||||||
|
; ---------------------------------------------------
|
||||||
|
; 0x81..0x8F
|
||||||
|
MB_FUNDSP:
|
||||||
|
dw MB_LEFT_
|
||||||
|
dw MB_RIGHT_
|
||||||
|
dw MB_MID_
|
||||||
|
dw MB_SGN
|
||||||
|
dw MB_INT
|
||||||
|
dw MB_ABS
|
||||||
|
dw MB_SQR
|
||||||
|
dw MB_RND
|
||||||
|
dw MB_SIN
|
||||||
|
dw MB_LOG
|
||||||
|
dw MB_EXP
|
||||||
|
dw MB_COS
|
||||||
|
dw MB_TAN
|
||||||
|
dw MB_ATN
|
||||||
|
dw MB_FRE
|
||||||
|
; 0x90..0x9F
|
||||||
|
dw MB_FNINP
|
||||||
|
dw MB_POS
|
||||||
|
dw MB_LEN
|
||||||
|
dw MB_STR_
|
||||||
|
dw MB_VAL
|
||||||
|
dw MB_ASC
|
||||||
|
dw MB_CHR_
|
||||||
|
dw MB_PEEK
|
||||||
|
dw MB_VPEEK
|
||||||
|
dw MB_SPACE_
|
||||||
|
dw MB_OCT_
|
||||||
|
dw MB_HEX_
|
||||||
|
dw MB_LPOS
|
||||||
|
dw MB_BIN_
|
||||||
|
dw MB_FRCINT
|
||||||
|
dw MB_FRCSNG
|
||||||
|
; 0xA0..0xAF
|
||||||
|
dw MB_FRCDBL
|
||||||
|
dw MB_FIXER
|
||||||
|
dw MB_STICK
|
||||||
|
dw MB_TRIGFN
|
||||||
|
dw MB_PDL
|
||||||
|
dw MB_PAD
|
||||||
|
dw MB_DSKF_
|
||||||
|
dw MB_FPOS
|
||||||
|
dw MB_CVI
|
||||||
|
dw MB_CVS
|
||||||
|
dw MB_CVD
|
||||||
|
dw MB_EOF
|
||||||
|
dw MB_LOC
|
||||||
|
dw MB_LOF
|
||||||
|
dw MB_MKI_
|
||||||
|
dw MB_MKS_
|
||||||
|
dw MB_MKD_
|
||||||
|
|
||||||
|
; ---------------------------------------------------
|
||||||
|
; Alphabetic operator and function dispatch table
|
||||||
|
; ---------------------------------------------------
|
||||||
|
ALPTAB:
|
||||||
|
DW ATAB
|
||||||
|
DW BTAB
|
||||||
|
DW CTAB
|
||||||
|
DW DTAB
|
||||||
|
DW ETAB
|
||||||
|
DW FTAB
|
||||||
|
DW GTAB
|
||||||
|
DW HTAB
|
||||||
|
DW ITAB
|
||||||
|
DW JTAB
|
||||||
|
DW KTAB
|
||||||
|
DW LTAB
|
||||||
|
DW MTAB
|
||||||
|
DW NTAB
|
||||||
|
DW OTAB
|
||||||
|
DW PTAB
|
||||||
|
DW QTAB
|
||||||
|
DW RTAB
|
||||||
|
DW STAB
|
||||||
|
DW TTAB
|
||||||
|
DW UTAB
|
||||||
|
DW VTAB
|
||||||
|
DW WTAB
|
||||||
|
DW XTAB
|
||||||
|
DW YTAB
|
||||||
|
DW ZTAB
|
||||||
|
|
||||||
|
; ---------------------------------------------------
|
||||||
|
; Alphabetic character by character
|
||||||
|
; operator and function table
|
||||||
|
; ---------------------------------------------------
|
||||||
|
|
||||||
|
; ---------------------------------------------------
|
||||||
|
ATAB:
|
||||||
|
DB "UT", 'O' + 0x80, _AUTO
|
||||||
|
DB "N", 'D' + 0x80, _AND
|
||||||
|
DB "B", 'S' + 0x80, _ABS - 0x80
|
||||||
|
DB "T", 'N' + 0x80, _ATN - 0x80
|
||||||
|
DB "S", 'C' + 0x80, _ASC - 0x80
|
||||||
|
DB "TTR", '$' + 0x80, _ATTR_
|
||||||
|
DB 0
|
||||||
|
; ---------------------------------------------------
|
||||||
|
BTAB:
|
||||||
|
DB "AS", 'E' + 0x80, _BASE
|
||||||
|
DB "SAV", 'E' + 0x80, _BSAVE
|
||||||
|
DB "LOA", 'D' + 0x80, _BLOAD
|
||||||
|
DB "EE", 'P' + 0x80, _BEEP
|
||||||
|
DB "IN", '$' + 0x80, _BIN_
|
||||||
|
DB 0
|
||||||
|
; ---------------------------------------------------
|
||||||
|
CTAB:
|
||||||
|
DB "AL", 'L' + 0x80, _CALL
|
||||||
|
DB "LOS", 'E' + 0x80, _CLOSE
|
||||||
|
DB "OP", 'Y' + 0x80, _COPY
|
||||||
|
DB "ON", 'T' + 0x80, _CONT
|
||||||
|
DB "LEA", 'R' + 0x80, _CLEAR
|
||||||
|
DB "LOA", 'D' + 0x80, _CLOAD
|
||||||
|
DB "SAV", 'E' + 0x80, _CSAVE
|
||||||
|
DB "SRLI", 'N' + 0x80, _CSRLIN
|
||||||
|
DB "IN", 'T' + 0x80, _CINT - 0x80
|
||||||
|
DB "SN", 'G' + 0x80, _CSNG - 0x80
|
||||||
|
DB "DB", 'L' + 0x80, _CDBL - 0x80
|
||||||
|
DB "V", 'I' + 0x80, _CVI - 0x80
|
||||||
|
DB "V", 'S' + 0x80, _CVS - 0x80
|
||||||
|
DB "V", 'D' + 0x80, _CVD - 0x80
|
||||||
|
DB "O", 'S' + 0x80, _COS - 0x80
|
||||||
|
DB "HR", '$' + 0x80, _CHR_ - 0x80
|
||||||
|
DB "IRCL", 'E' + 0x80, _CIRCLE
|
||||||
|
DB "OLO", 'R' + 0x80, _COLOR
|
||||||
|
DB "L", 'S' + 0x80, _CLS
|
||||||
|
DB "M", 'D' + 0x80, _CMD
|
||||||
|
DB 0
|
||||||
|
; ---------------------------------------------------
|
||||||
|
DTAB:
|
||||||
|
DB "ELET", 'E' + 0x80, _DELETE
|
||||||
|
DB "AT", 'A' + 0x80, _DATA
|
||||||
|
DB "I", 'M' + 0x80, _DIM
|
||||||
|
DB "EFST", 'R' + 0x80, _DEFSTR
|
||||||
|
DB "EFIN", 'T' + 0x80, _DEFINT
|
||||||
|
DB "EFSN", 'G' + 0x80, _DEFSNG
|
||||||
|
DB "EFDB", 'L' + 0x80, _DEFDBL
|
||||||
|
DB "SKO", '$' + 0x80, _DSKO_
|
||||||
|
DB "E", 'F' + 0x80, _DEF
|
||||||
|
DB "SKI", '$' + 0x80, _DSKI_
|
||||||
|
DB "SK", 'F' + 0x80, _DSKF_
|
||||||
|
DB "RA", 'W' + 0x80, _DRAW
|
||||||
|
DB 0
|
||||||
|
; ---------------------------------------------------
|
||||||
|
ETAB:
|
||||||
|
DB "LS", 'E' + 0x80, _ELSE
|
||||||
|
DB "N", 'D' + 0x80, _END
|
||||||
|
DB "RAS", 'E' + 0x80, _ERASE
|
||||||
|
DB "RRO", 'R' + 0x80, _ERROR
|
||||||
|
DB "R", 'L' + 0x80, _ERL
|
||||||
|
DB "R", 'R' + 0x80, _ERR
|
||||||
|
DB "X", 'P' + 0x80, _EXP - 0x80
|
||||||
|
DB "O", 'F' + 0x80, _EOF - 0x80
|
||||||
|
DB "Q", 'V' + 0x80, _EQV
|
||||||
|
DB 0
|
||||||
|
; ---------------------------------------------------
|
||||||
|
FTAB:
|
||||||
|
DB "O", 'R' + 0x80, _FOR
|
||||||
|
DB "IEL", 'D' + 0x80, _FIELD
|
||||||
|
DB "ILE", 'S' + 0x80, _FILES
|
||||||
|
DB 'N' + 0x80, _FN
|
||||||
|
DB "R", 'E' + 0x80, _FRE - 0x80
|
||||||
|
DB "I", 'X' + 0x80, _FIX - 0x80
|
||||||
|
DB "PO", 'S' + 0x80, _FPOS - 0x80
|
||||||
|
DB 0
|
||||||
|
; ---------------------------------------------------
|
||||||
|
GTAB:
|
||||||
|
DB "OT", 'O' + 0x80, _GOTO
|
||||||
|
DB "O T", 'O' + 0x80, _GOTO
|
||||||
|
DB "OSU", 'B' + 0x80, _GOSUB
|
||||||
|
DB "E", 'T' + 0x80, _GET
|
||||||
|
DB 0
|
||||||
|
; ---------------------------------------------------
|
||||||
|
HTAB:
|
||||||
|
DB "EX", '$' + 0x80, _HEX - 0x80
|
||||||
|
DB 0
|
||||||
|
; ---------------------------------------------------
|
||||||
|
ITAB:
|
||||||
|
DB "NPU", 'T' + 0x80, _INPUT
|
||||||
|
DB 'F' + 0x80, _IF
|
||||||
|
DB "NST", 'R' + 0x80, _INSTR
|
||||||
|
DB "N", 'T' + 0x80, _INT - 0x80
|
||||||
|
DB "N", 'P' + 0x80, _INP - 0x80
|
||||||
|
DB "M", 'P' + 0x80, _IMP
|
||||||
|
DB "NKEY", '$' + 0x80, _INKEY_
|
||||||
|
DB "P", 'L' + 0x80, _IPL
|
||||||
|
DB 0
|
||||||
|
; ---------------------------------------------------
|
||||||
|
JTAB:
|
||||||
|
DB 0
|
||||||
|
; ---------------------------------------------------
|
||||||
|
KTAB:
|
||||||
|
DB "IL", 'L' + 0x80, _KILL
|
||||||
|
DB "E", 'Y' + 0x80, _KEY
|
||||||
|
DB 0
|
||||||
|
; ---------------------------------------------------
|
||||||
|
LTAB:
|
||||||
|
DB "PRIN", 'T' + 0x80, _LPRINT
|
||||||
|
DB "LIS", 'T' + 0x80, _LLIST
|
||||||
|
DB "PO", 'S' + 0x80, _LPOS - 0x80
|
||||||
|
DB "E", 'T' + 0x80, _LET
|
||||||
|
DB "OCAT", 'E' + 0x80, _LOCATE
|
||||||
|
DB "IN", 'E' + 0x80, _LINE
|
||||||
|
DB "OA", 'D' + 0x80, _LOAD
|
||||||
|
DB "SE", 'T' + 0x80, _LSET
|
||||||
|
DB "IS", 'T' + 0x80, _LIST
|
||||||
|
DB "FILE", 'S' + 0x80, _LFILES
|
||||||
|
DB "O", 'G' + 0x80, _LOG - 0x80
|
||||||
|
DB "O", 'C' + 0x80, _LOC - 0x80
|
||||||
|
DB "E", 'N' + 0x80, _LEN - 0x80
|
||||||
|
DB "EFT", '$' + 0x80, _LEFT_
|
||||||
|
DB "O", 'F' + 0x80, _LOF - 0x80
|
||||||
|
DB 0
|
||||||
|
; ---------------------------------------------------
|
||||||
|
MTAB:
|
||||||
|
DB "OTO", 'R' + 0x80, _MOTOR
|
||||||
|
DB "ERG", 'E' + 0x80, _MERGE
|
||||||
|
DB "O", 'D' + 0x80, _MOD
|
||||||
|
DB "KI", '$' + 0x80, _MKI_ - 0x80
|
||||||
|
DB "KS", '$' + 0x80, _MKS_ - 0x80
|
||||||
|
DB "KD", '$' + 0x80, _MKD_ - 0x80
|
||||||
|
DB "ID", '$' + 0x80, _MID_ - 0x80
|
||||||
|
DB "A", 'X' + 0x80, _MAX
|
||||||
|
DB 0
|
||||||
|
; ---------------------------------------------------
|
||||||
|
NTAB:
|
||||||
|
DB "EX", 'T' + 0x80, _NEXT
|
||||||
|
DB "AM", 'E' + 0x80, _NAME
|
||||||
|
DB "E", 'W' + 0x80, _NEW
|
||||||
|
DB "O", 'T' + 0x80, _NOT
|
||||||
|
DB 0
|
||||||
|
; ---------------------------------------------------
|
||||||
|
OTAB:
|
||||||
|
DB "PE", 'N' + 0x80, _OPEN
|
||||||
|
DB "U", 'T' + 0x80, _OUT
|
||||||
|
DB 'N' + 0x80, _ON
|
||||||
|
DB 'R' + 0x80, _OR
|
||||||
|
DB "CT", '$' + 0x80, _OCT_ - 0x80
|
||||||
|
DB "F", 'F' + 0x80, _OFF
|
||||||
|
DB 0
|
||||||
|
; ---------------------------------------------------
|
||||||
|
PTAB:
|
||||||
|
DB "RIN", 'T' + 0x80, _PRINT
|
||||||
|
DB "U", 'T' + 0x80, _PUT
|
||||||
|
DB "OK", 'E' + 0x80, _POKE
|
||||||
|
DB "O", 'S' + 0x80, _POS - 0x80
|
||||||
|
DB "EE", 'K' + 0x80, _PEEK - 0x80
|
||||||
|
DB "SE", 'T' + 0x80, _PSET
|
||||||
|
DB "RESE", 'T' + 0x80, _PRESET
|
||||||
|
DB "OIN", 'T' + 0x80, _POINT
|
||||||
|
DB "AIN", 'T' + 0x80, _PAINT
|
||||||
|
DB "D", 'L' + 0x80, _PDL - 0x80
|
||||||
|
DB "A", 'D' + 0x80, _PAD - 0x80
|
||||||
|
DB "LA", 'Y' + 0x80, _PLAY
|
||||||
|
DB 0
|
||||||
|
; ---------------------------------------------------
|
||||||
|
QTAB:
|
||||||
|
DB 0
|
||||||
|
; ---------------------------------------------------
|
||||||
|
RTAB:
|
||||||
|
DB "ETUR", 'N' + 0x80, _RETURN
|
||||||
|
DB "EA", 'D' + 0x80, _READ
|
||||||
|
DB "U", 'N' + 0x80, _RUN
|
||||||
|
DB "ESTOR", 'E' + 0x80, _RESTORE
|
||||||
|
DB "E", 'M' + 0x80, _REM
|
||||||
|
DB "ESUM", 'E' + 0x80, _RESUME
|
||||||
|
DB "SE", 'T' + 0x80, _RSET
|
||||||
|
DB "IGHT", '$' + 0x80, _RIGHT_ - 0x80
|
||||||
|
DB "N", 'D' + 0x80, _RND - 0x80
|
||||||
|
DB "ENU", 'M' + 0x80, _RENUM
|
||||||
|
DB 0
|
||||||
|
; --------------------------------------------------
|
||||||
|
STAB:
|
||||||
|
DB "CREE", 'N' + 0x80, _SCREEN
|
||||||
|
DB "PRIT", 'E' + 0x80, _SPRITE
|
||||||
|
DB "TO", 'P' + 0x80, _STOP
|
||||||
|
DB "WA", 'P' + 0x80, _SWAP
|
||||||
|
DB "E", 'T' + 0x80, _SET
|
||||||
|
DB "AV", 'E' + 0x80, _SAVE
|
||||||
|
DB "PC", 'B' + 0x80, _SPC
|
||||||
|
DB "TE", 'P' + 0x80, _STEP
|
||||||
|
DB "G", 'N' + 0x80, _SGN - 0x80
|
||||||
|
DB "Q", 'R' + 0x80, _SQR - 0x80
|
||||||
|
DB "I", 'N' + 0x80, _SIN - 0x80
|
||||||
|
DB "TR", '$' + 0x80, _STR_ - 0x80
|
||||||
|
DB "TRING", '$' + 0x80, _STRING_
|
||||||
|
DB "PACE", '$' + 0x80, _SPACE_ - 0x80
|
||||||
|
DB "OUN", 'D' + 0x80, _SOUND
|
||||||
|
DB "TIC", 'K' + 0x80, _STICK - 0x80
|
||||||
|
DB "TRI", 'G' + 0x80, _STRIG
|
||||||
|
DB 0
|
||||||
|
; ---------------------------------------------------
|
||||||
|
TTAB:
|
||||||
|
DB "HE", 'N' + 0x80, _THEN
|
||||||
|
DB "RO", 'N' + 0x80, _TRON
|
||||||
|
DB "ROF", 'F' + 0x80, _TROFF
|
||||||
|
DB "AB", 'B' + 0x80, _TAB
|
||||||
|
DB 'O' + 0x80, _TO
|
||||||
|
DB "IM", 'E' + 0x80, _TIME
|
||||||
|
DB "A", 'N' + 0x80, _TAN - 0x80
|
||||||
|
DB 0
|
||||||
|
; ---------------------------------------------------
|
||||||
|
UTAB:
|
||||||
|
DB "SIN", 'G' + 0x80, _USING
|
||||||
|
DB "S", 'R' + 0x80, _USR
|
||||||
|
DB 0
|
||||||
|
; ---------------------------------------------------
|
||||||
|
VTAB:
|
||||||
|
DB "A", 'L' + 0x80, _VAL - 0x80
|
||||||
|
DB "ARPT", 'R' + 0x80, _VARPTR
|
||||||
|
DB "D", 'P' + 0x80, _VDP
|
||||||
|
DB "POK", 'E' + 0x80, _VPOKE
|
||||||
|
DB "PEE", 'K' + 0x80, _VPEEK - 0x80
|
||||||
|
DB 0
|
||||||
|
; ---------------------------------------------------
|
||||||
|
WTAB:
|
||||||
|
DB "IDT", 'H' + 0x80, _WIDTH
|
||||||
|
DB "AI", 'T' + 0x80, _WAIT
|
||||||
|
DB 0
|
||||||
|
; ---------------------------------------------------
|
||||||
|
XTAB:
|
||||||
|
DB "O", 'R' + 0x80, _XOR
|
||||||
|
DB 0
|
||||||
|
; ---------------------------------------------------
|
||||||
|
YTAB:
|
||||||
|
DB 0
|
||||||
|
; ---------------------------------------------------
|
||||||
|
ZTAB:
|
||||||
|
DB 0
|
||||||
|
|
||||||
|
; ---------------------------------------------------
|
||||||
|
; Special operators table
|
||||||
|
; ---------------------------------------------------
|
||||||
|
MB_SPCTAB
|
||||||
|
DB '+' + 0x80
|
||||||
|
DB PLUSTK
|
||||||
|
DB '-' + 0x80
|
||||||
|
DB MINUTK
|
||||||
|
DB '*' + 0x80
|
||||||
|
DB MULTK
|
||||||
|
DB '/' + 0x80
|
||||||
|
DB DIVTK
|
||||||
|
DB '^' + 0x80
|
||||||
|
DB EXPTK
|
||||||
|
DB ASCII_BKSL + 0x80
|
||||||
|
DB IDIVTK
|
||||||
|
DB '''' + 0x80
|
||||||
|
DB SNGQTK
|
||||||
|
DB '>' + 0x80
|
||||||
|
DB GREATK
|
||||||
|
DB '=' + 0x80
|
||||||
|
DB EQULTK
|
||||||
|
DB '<' + 0x80
|
||||||
|
DB LESSTK
|
||||||
|
DB 0
|
||||||
|
|
||||||
|
|
||||||
|
; ---------------------------------------------------
|
||||||
|
; Math precedences table
|
||||||
|
; ---------------------------------------------------
|
||||||
|
MB_OPTAB:
|
||||||
|
DB 121
|
||||||
|
DB 121
|
||||||
|
DB 124
|
||||||
|
DB 124
|
||||||
|
DB 127
|
||||||
|
DB 80
|
||||||
|
DB 70
|
||||||
|
DB 60
|
||||||
|
DB 50
|
||||||
|
DB 40
|
||||||
|
DB 122
|
||||||
|
DB 123
|
||||||
|
|
||||||
|
; ---------------------------------------------------
|
||||||
|
MB_FRCTBL:
|
||||||
|
dw MB_FRCDBL
|
||||||
|
dw 0
|
||||||
|
dw MB_FRCINT
|
||||||
|
dw MB_CHKSTR
|
||||||
|
dw MB_FRCSNG
|
||||||
|
|
||||||
|
; ---------------------------------------------------
|
||||||
|
MB_DBLDSP:
|
||||||
|
dw MB_DADD
|
||||||
|
dw MB_DSUB
|
||||||
|
dw MB_DMUL
|
||||||
|
dw MB_DDIV
|
||||||
|
dw MB_DEXP
|
||||||
|
dw MB_DCOMP
|
||||||
|
|
||||||
|
; ---------------------------------------------------
|
||||||
|
MB_SNGDSP:
|
||||||
|
dw MB_FADD
|
||||||
|
dw MB_FSUB
|
||||||
|
dw MB_FMUL
|
||||||
|
dw MB_FDIV
|
||||||
|
dw MB_FEXP
|
||||||
|
dw MB_FCOMP
|
||||||
|
|
||||||
|
; ---------------------------------------------------
|
||||||
|
MB_INTDSP:
|
||||||
|
dw MB_IADD
|
||||||
|
dw MB_ISUB
|
||||||
|
dw MB_IMUL
|
||||||
|
dw MB_IDIV1
|
||||||
|
dw MB_IEXP
|
||||||
|
dw MB_ICOMP
|
||||||
@@ -0,0 +1,341 @@
|
|||||||
|
; ===================================================
|
||||||
|
; Microsoft BASIC v2 for MSX System v 3.0
|
||||||
|
;
|
||||||
|
; Constants
|
||||||
|
; Disassembled by Romychs @ 2026-09-04
|
||||||
|
; ===================================================
|
||||||
|
|
||||||
|
|
||||||
|
; --------------------------------------------------
|
||||||
|
; ASCII codes
|
||||||
|
; --------------------------------------------------
|
||||||
|
ASCII_NUL EQU 0x00 ; NUL (null)
|
||||||
|
ASCII_EOT EQU 0x04 ; EOT (End of transmission)
|
||||||
|
ASCII_BELL EQU 0x07 ; 7
|
||||||
|
ASCII_BS EQU 0x08 ; 8
|
||||||
|
ASCII_TAB EQU 0x09 ; HT (Horizontal tab)
|
||||||
|
ASCII_LF EQU 0x0A ; 10 - LF (Line feed)
|
||||||
|
ASCII_CR EQU 0x0D ; 13 - CR (Carriage return)
|
||||||
|
ASCII_SYN EQU 0x16 ; SYN (Synchronous idle)
|
||||||
|
ASCII_SUB EQU 0x1A ; SUB (Substitute), EOF - (End of file)
|
||||||
|
ASCII_ESC EQU 0x1B ; 27 - ESC (Escape)
|
||||||
|
ASCII_SP EQU 0x20 ; space
|
||||||
|
ASCII_CUR EQU 0x24 ; $
|
||||||
|
ASCII_SQ EQU 0x27 ; '
|
||||||
|
ASCII_BKSL EQU 0x5C ; \
|
||||||
|
ASCII_DEL EQU 0x7F ; DEL (Delete)
|
||||||
|
|
||||||
|
|
||||||
|
; Function tokens
|
||||||
|
; 0x81..0x8F
|
||||||
|
_LEFT_ EQU 0x81 ; 129
|
||||||
|
_RIGHT_ EQU 0x82 ; 130
|
||||||
|
_MID_ EQU 0x83 ; 131
|
||||||
|
_SGN EQU 0x84 ; 132
|
||||||
|
_INT EQU 0x85 ; 133
|
||||||
|
_ABS EQU 0x86 ; 134
|
||||||
|
_SQR EQU 0x87 ; 135
|
||||||
|
_RND EQU 0x88 ; 136
|
||||||
|
_SIN EQU 0x89 ; 137
|
||||||
|
_LOG EQU 0x8a ; 138
|
||||||
|
_EXP EQU 0x8b ; 139
|
||||||
|
_COS EQU 0x8c ; 140
|
||||||
|
_TAN EQU 0x8d ; 141
|
||||||
|
_ATN EQU 0x8e ; 142
|
||||||
|
_FRE EQU 0x8f ; 143
|
||||||
|
; ----
|
||||||
|
_INP EQU 0x90 ; 144
|
||||||
|
_POS EQU 0x91 ; 145
|
||||||
|
_LEN EQU 0x92 ; 146
|
||||||
|
_STR_ EQU 0x93 ; 147
|
||||||
|
_VAL EQU 0x94 ; 148
|
||||||
|
_ASC EQU 0x95 ; 149
|
||||||
|
_CHR_ EQU 0x96 ; 150
|
||||||
|
_PEEK EQU 0x97 ; 151
|
||||||
|
_VPEEK EQU 0x98 ; 152
|
||||||
|
_SPACE_ EQU 0x99 ; 153
|
||||||
|
_OCT_ EQU 0x9a ; 154
|
||||||
|
_HEX EQU 0x9b ; 155
|
||||||
|
_LPOS EQU 0x9c ; 156
|
||||||
|
_BIN_ EQU 0x9d ; 157
|
||||||
|
_CINT EQU 0x9e ; 158
|
||||||
|
_CSNG EQU 0x9f ; 159
|
||||||
|
; ----
|
||||||
|
_CDBL EQU 0xA0 ; 160
|
||||||
|
_FIX EQU 0xA1 ; 161
|
||||||
|
_STICK EQU 0xA2 ; 162
|
||||||
|
_STRIG EQU 0xA3 ; 163
|
||||||
|
_PDL EQU 0xA4 ; 164
|
||||||
|
_PAD EQU 0xA5 ; 165
|
||||||
|
_DSKF_ EQU 0xA6 ; 166
|
||||||
|
_FPOS EQU 0xA7 ; 167
|
||||||
|
_CVI EQU 0xA8 ; 168
|
||||||
|
_CVS EQU 0xA9 ; 169
|
||||||
|
_CVD EQU 0xAa ; 170
|
||||||
|
_EOF EQU 0xAb ; 171
|
||||||
|
_LOC EQU 0xAc ; 172
|
||||||
|
_LOF EQU 0xAd ; 173
|
||||||
|
_MKI_ EQU 0xAe ; 174
|
||||||
|
_MKS_ EQU 0xAf ; 175
|
||||||
|
_MKD_ EQU 0xB0 ; 176
|
||||||
|
|
||||||
|
|
||||||
|
ONEFUN EQU 0x81 ; 129
|
||||||
|
|
||||||
|
; Operator tokens
|
||||||
|
; 0x80..0x8F
|
||||||
|
_END EQU 0x81 ; 129
|
||||||
|
_FOR EQU 0x82 ; 130
|
||||||
|
_NEXT EQU 0x83 ; 131
|
||||||
|
_DATA EQU 0x84 ; 132
|
||||||
|
_INPUT EQU 0x85 ; 133
|
||||||
|
_DIM EQU 0x86 ; 134
|
||||||
|
_READ EQU 0x87 ; 135
|
||||||
|
_LET EQU 0x88 ; 136
|
||||||
|
_GOTO EQU 0x89 ; 137
|
||||||
|
_RUN EQU 0x8a ; 138
|
||||||
|
_IF EQU 0x8b ; 139
|
||||||
|
_RESTORE EQU 0x8c ; 140
|
||||||
|
_GOSUB EQU 0x8d ; 141
|
||||||
|
_RETURN EQU 0x8e ; 142
|
||||||
|
_REM EQU 0x8f ; 143
|
||||||
|
; 0x90..0x9F
|
||||||
|
_STOP EQU 0x90 ; 144
|
||||||
|
_PRINT EQU 0x91 ; 145
|
||||||
|
_CLEAR EQU 0x92 ; 146
|
||||||
|
_LIST EQU 0x93 ; 147
|
||||||
|
_NEW EQU 0x94 ; 148
|
||||||
|
_ON EQU 0x95 ; 149
|
||||||
|
_WAIT EQU 0x96 ; 150
|
||||||
|
_DEF EQU 0x97 ; 151
|
||||||
|
_POKE EQU 0x98 ; 152
|
||||||
|
_CONT EQU 0x99 ; 153
|
||||||
|
_CSAVE EQU 0x9a ; 154
|
||||||
|
_CLOAD EQU 0x9b ; 155
|
||||||
|
_OUT EQU 0x9c ; 156
|
||||||
|
_LPRINT EQU 0x9d ; 157
|
||||||
|
_LLIST EQU 0x9e ; 158
|
||||||
|
_CLS EQU 0x9f ; 159
|
||||||
|
; 0xA0..0xAF
|
||||||
|
_WIDTH EQU 0xa0 ; 160
|
||||||
|
_ELSE EQU 0xa1 ; 161
|
||||||
|
_TRON EQU 0xa2 ; 162
|
||||||
|
_TROFF EQU 0xa3 ; 163
|
||||||
|
_SWAP EQU 0xa4 ; 164
|
||||||
|
_ERASE EQU 0xa5 ; 165
|
||||||
|
_ERROR EQU 0xa6 ; 166
|
||||||
|
_RESUME EQU 0xa7 ; 167
|
||||||
|
_DELETE EQU 0xa8 ; 168
|
||||||
|
_AUTO EQU 0xa9 ; 169
|
||||||
|
_RENUM EQU 0xaa ; 170
|
||||||
|
_DEFSTR EQU 0xab ; 171
|
||||||
|
_DEFINT EQU 0xac ; 172
|
||||||
|
_DEFSNG EQU 0xad ; 173
|
||||||
|
_DEFDBL EQU 0xae ; 174
|
||||||
|
_LINE EQU 0xaf ; 175
|
||||||
|
; 0xB0..0xBF
|
||||||
|
_OPEN EQU 0xb0 ; 176
|
||||||
|
_FIELD EQU 0xb1 ; 177
|
||||||
|
_GET EQU 0xb2 ; 178
|
||||||
|
_PUT EQU 0xb3 ; 179
|
||||||
|
_CLOSE EQU 0xb4 ; 180
|
||||||
|
_LOAD EQU 0xb5 ; 181
|
||||||
|
_MERGE EQU 0xb6 ; 182
|
||||||
|
_FILES EQU 0xb7 ; 183
|
||||||
|
_LSET EQU 0xb8 ; 184
|
||||||
|
_RSET EQU 0xb9 ; 185
|
||||||
|
_SAVE EQU 0xba ; 186
|
||||||
|
_LFILES EQU 0xbb ; 187
|
||||||
|
_CIRCLE EQU 0xbc ; 188
|
||||||
|
_COLOR EQU 0xbd ; 189
|
||||||
|
_DRAW EQU 0xbe ; 190
|
||||||
|
_PAINT EQU 0xbf ; 191
|
||||||
|
; 0xC0..0xCF
|
||||||
|
_BEEP EQU 0xc0 ; 192
|
||||||
|
_PLAY EQU 0xc1 ; 193
|
||||||
|
_PSET EQU 0xc2 ; 194
|
||||||
|
_PRESET EQU 0xc3 ; 195
|
||||||
|
_SOUND EQU 0xc4 ; 196
|
||||||
|
_SCREEN EQU 0xc5 ; 197
|
||||||
|
_VPOKE EQU 0xc6 ; 198
|
||||||
|
_SPRITE EQU 0xc7 ; 199
|
||||||
|
_VDP EQU 0xc8 ; 200
|
||||||
|
_BASE EQU 0xc9 ; 201
|
||||||
|
_CALL EQU 0xca ; 202
|
||||||
|
_TIME EQU 0xcb ; 203
|
||||||
|
_KEY EQU 0xcc ; 204
|
||||||
|
_MAX EQU 0xcd ; 205
|
||||||
|
_MOTOR EQU 0xce ; 206
|
||||||
|
_BLOAD EQU 0xcf ; 207
|
||||||
|
; 0xD0..0xDF
|
||||||
|
_BSAVE EQU 0xd0 ; 208
|
||||||
|
_DSKO_ EQU 0xd1 ; 209
|
||||||
|
_SET EQU 0xd2 ; 210
|
||||||
|
_NAME EQU 0xd3 ; 211
|
||||||
|
_KILL EQU 0xd4 ; 212
|
||||||
|
_IPL EQU 0xd5 ; 213
|
||||||
|
_COPY EQU 0xd6 ; 214
|
||||||
|
_CMD EQU 0xd7 ; 215
|
||||||
|
_LOCATE EQU 0xd8 ; 216
|
||||||
|
|
||||||
|
NUMCMD EQU _LOCATE - _END + 1 ; 88 Number of commands
|
||||||
|
|
||||||
|
_TO EQU 0xd9 ; 217
|
||||||
|
_THEN EQU 0xda ; 218
|
||||||
|
_TAB EQU 0xdb ; 219
|
||||||
|
_STEP EQU 0xdc ; 220
|
||||||
|
_USR EQU 0xdd ; 221
|
||||||
|
_FN EQU 0xde ; 222
|
||||||
|
_SPC EQU 0xdf ; 223
|
||||||
|
; 0xE0..0xEF
|
||||||
|
_NOT EQU 0xe0 ; 224
|
||||||
|
_ERL EQU 0xe1 ; 225
|
||||||
|
_ERR EQU 0xe2 ; 226
|
||||||
|
_STRING_ EQU 0xe3 ; 227
|
||||||
|
_USING EQU 0xe4 ; 228
|
||||||
|
_INSTR EQU 0xe5 ; 229
|
||||||
|
; 0xE6 skipped
|
||||||
|
_VARPTR EQU 0xe7 ; 231
|
||||||
|
_CSRLIN EQU 0xe8 ; 232
|
||||||
|
_ATTR_ EQU 0xe9 ; 233
|
||||||
|
_DSKI_ EQU 0xea ; 234
|
||||||
|
_OFF EQU 0xeb ; 235
|
||||||
|
_INKEY_ EQU 0xec ; 236
|
||||||
|
_POINT EQU 0xed ; 237
|
||||||
|
;
|
||||||
|
|
||||||
|
;EXPTK EQU 0xf5
|
||||||
|
_AND EQU 0xf6 ; 246
|
||||||
|
_OR EQU 0xf7 ; 247
|
||||||
|
|
||||||
|
_XOR EQU 0xf8 ; 248
|
||||||
|
_EQV EQU 0xf9 ; 249
|
||||||
|
_IMP EQU 0xfa ; 250
|
||||||
|
_MOD EQU 0xfb ; 251
|
||||||
|
|
||||||
|
; --------------------------------------------------
|
||||||
|
; Operation tokens
|
||||||
|
; --------------------------------------------------
|
||||||
|
TABTK EQU 0xdb
|
||||||
|
SPCTK EQU 0xdf
|
||||||
|
USINTK EQU 0xe4
|
||||||
|
SNGQTK EQU 0xe6
|
||||||
|
GREATK EQU 0xee
|
||||||
|
EQULTK EQU 0xef
|
||||||
|
LESSTK EQU 0xf0
|
||||||
|
PLUSTK EQU 0xf1
|
||||||
|
MINUTK EQU 0xf2
|
||||||
|
MULTK EQU 0xf3
|
||||||
|
DIVTK EQU 0xf4
|
||||||
|
EXPTK EQU 0xf5
|
||||||
|
IDIVTK EQU 0xfc
|
||||||
|
|
||||||
|
; --------------------------------------------------
|
||||||
|
; Base tokens
|
||||||
|
; --------------------------------------------------
|
||||||
|
OCTCON EQU 0x0B ; 11 embeded Octal constant
|
||||||
|
HEXCON EQU 0x0C ; 12 embeded Hex constant
|
||||||
|
PTRCON EQU 0x0D ; 13 line pointer constant
|
||||||
|
LINCON EQU 0x0E ; 14 line number
|
||||||
|
IN2CON EQU 0x0F ; 15 Single byte integer (two byte with token) 11..255
|
||||||
|
|
||||||
|
CONCN2 EQU 0x10 ; 16 Internal token, returned second type constant is scaned
|
||||||
|
|
||||||
|
ONECON EQU 0x11 ; 17 First of 10 special tokens for Int (0x11 - 1, 0x12 - 2 ... 0x1B - 10)
|
||||||
|
INTCON EQU 0x1C ; 28 2-byte Int
|
||||||
|
SNGCON EQU 0x1D ; 29 4-byte single precision real EEDDDDDD
|
||||||
|
CONCON EQU 0x1E ; 30 Internal token, returned by CHARGET after constant scanned
|
||||||
|
DBLCON EQU 0x1F ; 31 8-byte double precision real EEDDDDDDDDDDDDDD
|
||||||
|
|
||||||
|
|
||||||
|
; --------------------------------------------------
|
||||||
|
; Types
|
||||||
|
; --------------------------------------------------
|
||||||
|
TINT EQU 0x02 ; 2 2-byte Integer
|
||||||
|
TSTR EQU 0x03 ; 3 <B_len>+<W-prt> String
|
||||||
|
TSGN EQU 0x04 ; 4 4-byte single precision real
|
||||||
|
TDBL EQU 0x08 ; 8 8-byte single precision real
|
||||||
|
|
||||||
|
; --------------------------------------------------
|
||||||
|
; Constants to skip next Ops
|
||||||
|
; --------------------------------------------------
|
||||||
|
LD_A_n EQU 0x3E ; skip next 1-byte op
|
||||||
|
LD_B_n EQU 0x06 ; skip next 1-byte op
|
||||||
|
LD_C_n EQU 0x0E ; skip next 1-byte op
|
||||||
|
LD_D_n EQU 0x16 ; skip next 1-byte op
|
||||||
|
LD_E_n EQU 0x1E
|
||||||
|
LD_BC_nn EQU 0x01 ; skip next 2-byte op
|
||||||
|
LD_DE_nn EQU 0x11 ; skip next 2-byte op
|
||||||
|
LD_HL_nn EQU 0x21
|
||||||
|
JP_NZ_nn EQU 0xC2 ;
|
||||||
|
JP_Z_nn EQU 0xCA ; skip next 2-byte op
|
||||||
|
OR_n EQU 0xF6 ; skip next byte op, set flags
|
||||||
|
CP_n EQU 0xFE ; skip next byte op, set flags
|
||||||
|
|
||||||
|
|
||||||
|
FORSIZ EQU 0x16
|
||||||
|
|
||||||
|
INT2CON EQU 0x0f
|
||||||
|
NMLO.C EQU 0x08
|
||||||
|
CLMWID EQU 0x0e
|
||||||
|
LSTOPK EQU 0x0c
|
||||||
|
NMREL EQU 0x03
|
||||||
|
ARG EQU 4
|
||||||
|
|
||||||
|
|
||||||
|
; --------------------------------------------------
|
||||||
|
; EXT BIOS funcion numbers
|
||||||
|
; --------------------------------------------------
|
||||||
|
S.PAINT EQU 0x069
|
||||||
|
S.PSET EQU 0x06d
|
||||||
|
S.GLINE EQU 0x075
|
||||||
|
S.DOGRPH EQU 0x085
|
||||||
|
S.GRPPRT EQU 0x089
|
||||||
|
S.MAPXYC EQU 0x091
|
||||||
|
S.READC EQU 0x095
|
||||||
|
S.SETC EQU 0x09d
|
||||||
|
S.TRIGHT EQU 0x0a1
|
||||||
|
S.RIGHTC EQU 0x0a5
|
||||||
|
S.TLEFTC EQU 0x0a9
|
||||||
|
S.LEFTC EQU 0x0ad
|
||||||
|
S.TDOWNC EQU 0x0b1
|
||||||
|
S.DOWNC EQU 0x0b5
|
||||||
|
S.TUPC EQU 0x0b9
|
||||||
|
S.UPC EQU 0x0bd
|
||||||
|
S.SCANR EQU 0x0c1
|
||||||
|
S.SCANL EQU 0x0c5
|
||||||
|
S.CHGMOD EQU 0x0d1
|
||||||
|
S.INITXT EQU 0x0d5
|
||||||
|
S.INIT32 EQU 0x0d9
|
||||||
|
S.INIGRP EQU 0x0dd
|
||||||
|
S.INIMLT EQU 0x0e1
|
||||||
|
S.SETTXT EQU 0x0e5
|
||||||
|
S.SETT32 EQU 0x0e9
|
||||||
|
S.SETGRP EQU 0x0ed
|
||||||
|
S.SETMLT EQU 0x0f1
|
||||||
|
S.CLRSPR EQU 0x0f5
|
||||||
|
S.CLS EQU 0x115
|
||||||
|
S.CLRTXT EQU 0x119
|
||||||
|
S.DSPFNK EQU 0x11d
|
||||||
|
S.DELLNO EQU 0x121
|
||||||
|
S.INSLNO EQU 0x125
|
||||||
|
S.WRTVDP EQU 0x12d
|
||||||
|
S.PUTCHR EQU 0x139
|
||||||
|
S.PUTSPRT EQU 0x151
|
||||||
|
S.COLOR EQU 0x155
|
||||||
|
S.SCREEN EQU 0x159
|
||||||
|
S.WIDTHS EQU 0x15d
|
||||||
|
S.VDP EQU 0x161
|
||||||
|
S.VDPF EQU 0x165
|
||||||
|
S.BASE EQU 0x169
|
||||||
|
S.BASEF EQU 0x16d
|
||||||
|
S.VPOKE EQU 0x171
|
||||||
|
S.VPEEK EQU 0x175
|
||||||
|
S.SETS EQU 0x179
|
||||||
|
S.PROMPT EQU 0x181
|
||||||
|
S.SDFSCR EQU 0x185
|
||||||
|
S.SETSCR EQU 0x189
|
||||||
|
S.SCOPY EQU 0x18d
|
||||||
|
S.NEWPAD EQU 0x1ad
|
||||||
|
S.GETPUT EQU 0x1b1
|
||||||
|
S.CHGMDP EQU 0x1b5
|
||||||
@@ -0,0 +1,98 @@
|
|||||||
|
; ===================================================
|
||||||
|
; Microsoft BASIC v2 for MSX System v3.0
|
||||||
|
;
|
||||||
|
; Error messages and constants
|
||||||
|
; Disassembled by Romychs @ 2026-09-03
|
||||||
|
; ===================================================
|
||||||
|
|
||||||
|
; --------------------------------------------------
|
||||||
|
; Error messages
|
||||||
|
; --------------------------------------------------
|
||||||
|
MB_ERRTAB:
|
||||||
|
DB 0x00
|
||||||
|
MB_ERROR_MSGS:
|
||||||
|
DB "NEXT without FOR", 0 ; 0x01
|
||||||
|
DB "Syntax error", 0 ; 0x02
|
||||||
|
DB "RETURN without GOSUB", 0 ; 0x03
|
||||||
|
DB "Out of DATA", 0 ; 0x04
|
||||||
|
DB "Illegal function call", 0 ; 0x05
|
||||||
|
MB_OVRMSG:
|
||||||
|
DB "Overflow", 0 ; 0x06
|
||||||
|
DB "Out of memory", 0 ; 0x07
|
||||||
|
DB "Undefined line number", 0 ; 0x08
|
||||||
|
DB "Subscript out of range", 0 ; 0x09
|
||||||
|
DB "Redimensioned array", 0 ; 0x0A
|
||||||
|
MB_DBZ_MSG:
|
||||||
|
DB "Division by zero", 0 ; 0x0B
|
||||||
|
DB "Illegal direct", 0 ; 0x0C
|
||||||
|
DB "Type mismatch", 0 ; 0x0D
|
||||||
|
DB "Out of string space", 0 ; 0x0E
|
||||||
|
DB "String too long", 0 ; 0x0F
|
||||||
|
DB "String formula too complex", 0 ; 0x10
|
||||||
|
DB "Can't CONTINUE", 0 ; 0x11
|
||||||
|
DB "Undefined user function", 0 ; 0x12
|
||||||
|
DB "Device I/O error", 0 ; 0x13
|
||||||
|
DB "Verify error", 0 ; 0x14
|
||||||
|
DB "No RESUME", 0 ; 0x15
|
||||||
|
DB "RESUME without error", 0 ; 0x16
|
||||||
|
DB "Unprintable error", 0 ; 0x17
|
||||||
|
DB "Missing operand", 0 ; 0x18
|
||||||
|
DB "Line buffer overflow", 0 ; 0x19
|
||||||
|
DB "FIELD overflow", 0 ; 0x1A
|
||||||
|
DB "Internal error", 0 ; 0x1B
|
||||||
|
DB "Bad file number", 0 ; 0x1C
|
||||||
|
DB "File not found", 0 ; 0x1D
|
||||||
|
DB "File already open", 0 ; 0x1E
|
||||||
|
DB "Input past end", 0 ; 0x1F
|
||||||
|
DB "Bad file name", 0 ; 0x20
|
||||||
|
DB "Direct statement in file", 0 ; 0x21
|
||||||
|
DB "Sequential I/O only", 0 ; 0x22
|
||||||
|
DB "File not OPEN", 0 ; 0x23
|
||||||
|
|
||||||
|
; --------------------------------------------------
|
||||||
|
; Error codes
|
||||||
|
; --------------------------------------------------
|
||||||
|
ERRNF EQU 0x01 ; 1
|
||||||
|
ERRSN EQU 0x02 ; 2
|
||||||
|
ERRRG EQU 0x03 ; 3
|
||||||
|
ERROD EQU 0x04 ; 4
|
||||||
|
ERRFC EQU 0x05 ; 5 Illegal function call
|
||||||
|
ERROV EQU 0x06 ; 6
|
||||||
|
ERROM EQU 0x07 ; 7 Out of memory
|
||||||
|
ERRULN EQU 0x08 ; 8 Undefined line number
|
||||||
|
ERRBS EQU 0x09 ; 9
|
||||||
|
ERRDD EQU 0x0a ; 10
|
||||||
|
ERRDV0 EQU 0x0b ; 11
|
||||||
|
ERRID EQU 0x0c ; 12
|
||||||
|
ERRTM EQU 0x0d ; 13
|
||||||
|
ERRSO EQU 0x0e ; Out of space
|
||||||
|
ERRLS EQU 0x0f ; 15
|
||||||
|
ERRST EQU 0x10 ; String formula too complex
|
||||||
|
ERRCN EQU 0x11 ; 17
|
||||||
|
ERRUF EQU 0x12 ; Undefined user function
|
||||||
|
ERRDIO EQU 0x13 ; 19 Device IO error
|
||||||
|
ERRVE EQU 0x14 ; 20 Verify error
|
||||||
|
ERRNR EQU 0x15 ; 21 No resume
|
||||||
|
ERRRWE EQU 0x16 ; 22 Resume wo error
|
||||||
|
ERRUE EQU 0x17 ; 23 Unprintable error
|
||||||
|
ERRMO EQU 0x18 ; 24 Missing operand
|
||||||
|
ERRLBO EQU 0x19 ; 25 Line buff over
|
||||||
|
|
||||||
|
NONDSK EQU 0x1C
|
||||||
|
|
||||||
|
DSKERR EQU 0x31
|
||||||
|
|
||||||
|
ERRFO EQU 0x32 ; 26 Field overflow
|
||||||
|
ERRIE EQU 0x33 ; 27 Internal error
|
||||||
|
ERRBFN EQU 0x34 ; 28 Bad File Number
|
||||||
|
ERRFNF EQU 0x35 ; 29 File Not Found
|
||||||
|
ERRFAO EQU 0x36 ; 30 File Already open
|
||||||
|
ERRIPE EQU 0x37 ; 31 Inp past end
|
||||||
|
ERRBN EQU 0x38 ; 32 Bad file Name
|
||||||
|
ERRDSF EQU 0x39 ; 33 Direct stmt in file
|
||||||
|
ERRSIO EQU 0x3A ; 34 Sequential I/O only
|
||||||
|
ERRFNO EQU 0x3B ; 35 File not open
|
||||||
|
|
||||||
|
LSTERR EQU 0x3C
|
||||||
|
|
||||||
|
KBFLEN EQU 0x13E ; 318
|
||||||
@@ -0,0 +1,165 @@
|
|||||||
|
; ===================================================
|
||||||
|
; Microsoft BASIC v2 for MSX System v3.0
|
||||||
|
;
|
||||||
|
; Initial values for variables
|
||||||
|
; Disassembled by Romychs @ 2026-09-03
|
||||||
|
; ===================================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
MODULE INIVAL
|
||||||
|
|
||||||
|
START EQU $
|
||||||
|
|
||||||
|
OUT (PSSR), A
|
||||||
|
LD E, (HL)
|
||||||
|
JR LAB_1
|
||||||
|
WRPRIM:
|
||||||
|
OUT (PSSR), A
|
||||||
|
LD (HL), E
|
||||||
|
LAB_1:
|
||||||
|
LD A, D
|
||||||
|
OUT (PSSR), A
|
||||||
|
RET
|
||||||
|
CLPRIM:
|
||||||
|
OUT (PSSR), A
|
||||||
|
EX AF, AF
|
||||||
|
CALL CLPRM1
|
||||||
|
EX AF, AF
|
||||||
|
POP AF
|
||||||
|
OUT (PSSR), A
|
||||||
|
EX AF, AF
|
||||||
|
RET
|
||||||
|
JP (IX)
|
||||||
|
|
||||||
|
; --------------------------------------------------
|
||||||
|
MB_USRTAB:
|
||||||
|
DW MB_FCERR
|
||||||
|
DW MB_FCERR
|
||||||
|
DW MB_FCERR
|
||||||
|
DW MB_FCERR
|
||||||
|
DW MB_FCERR
|
||||||
|
DW MB_FCERR
|
||||||
|
DW MB_FCERR
|
||||||
|
DW MB_FCERR
|
||||||
|
DW MB_FCERR
|
||||||
|
DW MB_FCERR
|
||||||
|
|
||||||
|
; --------------------------------------------------
|
||||||
|
MB_LINL40:
|
||||||
|
DB 39
|
||||||
|
MB_LINL32:
|
||||||
|
DB 29
|
||||||
|
MB_LINLEN:
|
||||||
|
DB 29
|
||||||
|
MB_CRTCNT:
|
||||||
|
DB 24
|
||||||
|
MB_CLMLST:
|
||||||
|
DB 14
|
||||||
|
TXTNAM:
|
||||||
|
DW 0x00
|
||||||
|
TXTCOL:
|
||||||
|
DW 0x00
|
||||||
|
TXTCGP:
|
||||||
|
DW 0x800
|
||||||
|
TXTATR:
|
||||||
|
DW 0x00
|
||||||
|
TXTPAT:
|
||||||
|
DW 0x00
|
||||||
|
T32NAM:
|
||||||
|
DW 0x1800
|
||||||
|
T32COL:
|
||||||
|
DW 0x2000
|
||||||
|
T32CGP:
|
||||||
|
DW 0x00
|
||||||
|
T32ATR:
|
||||||
|
DW 0x1B00
|
||||||
|
T32PAT:
|
||||||
|
DW 0x3800
|
||||||
|
GRPNAM:
|
||||||
|
DW 0x1800
|
||||||
|
GRPCOL:
|
||||||
|
DW 0x2000
|
||||||
|
GRPCGP:
|
||||||
|
DW 0x00
|
||||||
|
GRPATR:
|
||||||
|
DW 0x1B00
|
||||||
|
GRPPAT:
|
||||||
|
DW 0x3800
|
||||||
|
MLTNAM:
|
||||||
|
DW 0x800
|
||||||
|
MLTCOL:
|
||||||
|
DW 0x00
|
||||||
|
MLTCGP:
|
||||||
|
DW 0x00
|
||||||
|
MLTATR:
|
||||||
|
DW 0x1B00
|
||||||
|
MLTPAT:
|
||||||
|
DW 0x3800
|
||||||
|
CLIKSW:
|
||||||
|
DB 1
|
||||||
|
CSRY:
|
||||||
|
DB 1
|
||||||
|
CSRX:
|
||||||
|
DB 1
|
||||||
|
CNSDFG:
|
||||||
|
DB 0
|
||||||
|
RG0SAV:
|
||||||
|
DB 0
|
||||||
|
RG1SAV:
|
||||||
|
DB 0xE0
|
||||||
|
RG2SAV:
|
||||||
|
DB 0
|
||||||
|
RG3SAV:
|
||||||
|
DB 0
|
||||||
|
RG4SAV:
|
||||||
|
DB 0
|
||||||
|
RG5SAV:
|
||||||
|
DB 0
|
||||||
|
RG6SAV:
|
||||||
|
DB 0
|
||||||
|
RG7SAV:
|
||||||
|
DB 0
|
||||||
|
STATFL:
|
||||||
|
DB 0
|
||||||
|
TRGFLG:
|
||||||
|
DB 0xFF
|
||||||
|
FORCLR:
|
||||||
|
DB 0x0F
|
||||||
|
BAKCLR:
|
||||||
|
DB 4
|
||||||
|
BDRCLR:
|
||||||
|
DB 7
|
||||||
|
MAXUPD:
|
||||||
|
JP RST0
|
||||||
|
MINUPD:
|
||||||
|
JP RST0
|
||||||
|
ATRBYT:
|
||||||
|
DB 0x0F
|
||||||
|
QUEUES:
|
||||||
|
DW MB_QUETAB
|
||||||
|
FRCNEW:
|
||||||
|
DB 0xFF
|
||||||
|
SCNCNT:
|
||||||
|
DB 1
|
||||||
|
REPCNT:
|
||||||
|
DB 50
|
||||||
|
PUTPNT:
|
||||||
|
DW MB_KEYBUF
|
||||||
|
GETPNT:
|
||||||
|
DW MB_KEYBUF
|
||||||
|
CS1200:
|
||||||
|
DB 0x53, 0x5C, 0x26, 0x2D, 0x0F
|
||||||
|
CS2400:
|
||||||
|
DB 0x25, 0x2D, 0x0E, 0x16, 0x1F
|
||||||
|
DB 0x53, 0x5C, 0x26, 0x2D, 0x0F
|
||||||
|
ASPCT1:
|
||||||
|
DW 0x0100
|
||||||
|
ASPCT2:
|
||||||
|
DW 0x0100
|
||||||
|
ENDPRG:
|
||||||
|
DB ':'
|
||||||
|
|
||||||
|
SIZE EQU $ - START ; Size of initval block
|
||||||
|
|
||||||
|
ENDMODULE
|
||||||
+3523
File diff suppressed because it is too large.
Load diff
+12410
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,608 @@
|
|||||||
|
; ===================================================
|
||||||
|
; Microsoft BASIC v2 for MSX System v 3.0
|
||||||
|
;
|
||||||
|
; Symbol reference
|
||||||
|
; Disassembled by Romychs @ 2026-09-14
|
||||||
|
; ===================================================
|
||||||
|
|
||||||
|
; ---------------------------------------------------
|
||||||
|
; BIOS references
|
||||||
|
; ---------------------------------------------------
|
||||||
|
PSSR EQU 0xA8 ; Primary Slot Select Register
|
||||||
|
VDP_SC_REG EQU 0x99 ; I/O Port
|
||||||
|
RST0 EQU 0x0000 ; Instruction Label
|
||||||
|
CGTABL EQU 0x0004 ; Data Label
|
||||||
|
VDP_DR EQU 0x0006 ; Data Label
|
||||||
|
VDP_DW EQU 0x0007 ; Data Label
|
||||||
|
SYNCHR EQU 0x0008 ; Instruction Label
|
||||||
|
RDSLT EQU 0x000c ; Instruction Label
|
||||||
|
CHRGTR EQU 0x0010 ; Instruction Label
|
||||||
|
WRSLT EQU 0x0014 ; Instruction Label
|
||||||
|
OUTDO EQU 0x0018 ; Instruction Label
|
||||||
|
CALSLT EQU 0x001c ; Instruction Label
|
||||||
|
DCOMPR EQU 0x0020 ; Instruction Label
|
||||||
|
ENASLT EQU 0x0024 ; Instruction Label
|
||||||
|
GETYPR EQU 0x0028 ; Instruction Label
|
||||||
|
MSX_ID1 EQU 0x002b ; Data Label
|
||||||
|
MSX_ID2 EQU 0x002c ; Data Label
|
||||||
|
MSXID3 EQU 0x002d ; Data Label
|
||||||
|
MSXID4 EQU 0x002e ; Data Label
|
||||||
|
MSXID5 EQU 0x002f ; Data Label
|
||||||
|
CALLF EQU 0x0030 ; Instruction Label
|
||||||
|
KEYINT EQU 0x0038 ; Instruction Label
|
||||||
|
INITIO EQU 0x003b ; Instruction Label
|
||||||
|
INIFNK EQU 0x003e ; Instruction Label
|
||||||
|
WRTVDP EQU 0x0047 ; Instruction Label
|
||||||
|
RDVRM EQU 0x004a ; Instruction Label
|
||||||
|
WRTVRM EQU 0x004d ; Instruction Label
|
||||||
|
LDIRMV EQU 0x0059 ; Instruction Label
|
||||||
|
LDIRVM EQU 0x005c ; Instruction Label
|
||||||
|
NMI_ISR EQU 0x0066 ; Instruction Label
|
||||||
|
CALPAT EQU 0x0084 ; Instruction Label
|
||||||
|
CATATR EQU 0x0087 ; Instruction Label
|
||||||
|
GSPSIZ EQU 0x008a ; Instruction Label
|
||||||
|
GRPPTR EQU 0x008d ; Instruction Label
|
||||||
|
GICINI EQU 0x0090 ; Instruction Label
|
||||||
|
WRTPSG EQU 0x0093 ; Instruction Label
|
||||||
|
STRTMS EQU 0x0099 ; Instruction Label
|
||||||
|
CHSNS EQU 0x009c ; Instruction Label
|
||||||
|
CHGET EQU 0x009f ; Instruction Label
|
||||||
|
CHPUT EQU 0x00a2 ; Instruction Label
|
||||||
|
LPTOUT EQU 0x00a5 ; Instruction Label
|
||||||
|
LPTSTT EQU 0x00a8 ; Instruction Label
|
||||||
|
CNVCHR EQU 0x00ab ; Instruction Label
|
||||||
|
PINLIN EQU 0x00ae ; Instruction Label
|
||||||
|
INLIN EQU 0x00b1 ; Instruction Label
|
||||||
|
QINLIN EQU 0x00b4 ; Instruction Label
|
||||||
|
ISCNTC EQU 0x00ba ; Instruction Label
|
||||||
|
CKCNTC EQU 0x00bd ; Instruction Label
|
||||||
|
BEEP EQU 0x00c0 ; Instruction Label
|
||||||
|
CLS EQU 0x00c3 ; Instruction Label
|
||||||
|
POSIT EQU 0x00c6 ; Instruction Label
|
||||||
|
FNKSB EQU 0x00c9 ; Instruction Label
|
||||||
|
ERAFNK EQU 0x00cc ; Instruction Label
|
||||||
|
DSPFNK EQU 0x00cf ; Instruction Label
|
||||||
|
TOTEXT EQU 0x00d2 ; Instruction Label
|
||||||
|
GTSTCK EQU 0x00d5 ; Instruction Label
|
||||||
|
GTTRIG EQU 0x00d8 ; Instruction Label
|
||||||
|
GTPAD EQU 0x00db ; Instruction Label
|
||||||
|
GTPDL EQU 0x00de ; Instruction Label
|
||||||
|
TAPION EQU 0x00e1 ; Instruction Label
|
||||||
|
TAPIN EQU 0x00e4 ; Instruction Label
|
||||||
|
TAPIOF EQU 0x00e7 ; Instruction Label
|
||||||
|
TAPOON EQU 0x00ea ; Instruction Label
|
||||||
|
TAPOUT EQU 0x00ed ; Instruction Label
|
||||||
|
TAPOOF EQU 0x00f0 ; Instruction Label
|
||||||
|
STMOTR EQU 0x00f3 ; Instruction Label
|
||||||
|
LFTQ EQU 0x00f6 ; Instruction Label
|
||||||
|
PUTQ EQU 0x00f9 ; Instruction Label
|
||||||
|
RIGHTC EQU 0x00fc ; Instruction Label
|
||||||
|
LEFTC EQU 0x00ff ; Instruction Label
|
||||||
|
UPC EQU 0x0102 ; Instruction Label
|
||||||
|
TUPC EQU 0x0105 ; Instruction Label
|
||||||
|
DOWNC EQU 0x0108 ; Instruction Label
|
||||||
|
TDOWNC EQU 0x010b ; Instruction Label
|
||||||
|
SCALXY EQU 0x010e ; Instruction Label
|
||||||
|
MAPXYC EQU 0x0111 ; Instruction Label
|
||||||
|
FETCHC EQU 0x0114 ; Instruction Label
|
||||||
|
STOREC EQU 0x0117 ; Instruction Label
|
||||||
|
SETATR EQU 0x011a ; Instruction Label
|
||||||
|
READC EQU 0x011d ; Instruction Label
|
||||||
|
SETC EQU 0x0120 ; Instruction Label
|
||||||
|
NSETCX EQU 0x0123 ; Instruction Label
|
||||||
|
GTASPC EQU 0x0126 ; Instruction Label
|
||||||
|
PNTINI EQU 0x0129 ; Instruction Label
|
||||||
|
SCANR EQU 0x012c ; Instruction Label
|
||||||
|
SCANL EQU 0x012f ; Instruction Label
|
||||||
|
RDVDP EQU 0x013e ; Instruction Label
|
||||||
|
MB_ISFLIO EQU 0x014a ; Instruction Label
|
||||||
|
OUTDLP EQU 0x014d ; Instruction Label
|
||||||
|
GETVCP EQU 0x0150 ; Instruction Label
|
||||||
|
GETVC2 EQU 0x0153 ; Instruction Label
|
||||||
|
EXTROM EQU 0x015f ; Instruction Label
|
||||||
|
CHKSLZ EQU 0x0162 ; Instruction Label
|
||||||
|
CHKNEW EQU 0x0165 ; Instruction Label
|
||||||
|
BIGFIL EQU 0x016b ; Instruction Label
|
||||||
|
B_CALSLT EQU 0x01b6 ; Instruction Label
|
||||||
|
B_RDSLT EQU 0x01f5 ; Instruction Label
|
||||||
|
B_RDSLT_EX EQU 0x0205 ; Instruction Label
|
||||||
|
B_CALSLT1 EQU 0x0217 ; Instruction Label
|
||||||
|
B_RDSLT1 EQU 0x021a ; Instruction Label
|
||||||
|
B_WRSLT EQU 0x0225 ; Instruction Label
|
||||||
|
B_WRSLT_EX EQU 0x0235 ; Instruction Label
|
||||||
|
B_SW_BAS_ROM EQU 0x0255 ; Instruction Label
|
||||||
|
B_WRSLT_EX1 EQU 0x026e ; Instruction Label
|
||||||
|
B_CPS_00 EQU 0x028c ; Instruction Label
|
||||||
|
B_SUBROM EQU 0x0295 ; Instruction Label
|
||||||
|
B_EXTROM EQU 0x029b ; Instruction Label
|
||||||
|
B_CALBAS EQU 0x02bf ; Instruction Label
|
||||||
|
B_CALLF EQU 0x02c6 ; Instruction Label
|
||||||
|
B_CALSLT2 EQU 0x02d8 ; Instruction Label
|
||||||
|
B_CALSLT_EXP EQU 0x02ef ; Instruction Label
|
||||||
|
B_ENASLT EQU 0x0333 ; Instruction Label
|
||||||
|
B_ENASLT_EXP EQU 0x0340 ; Instruction Label
|
||||||
|
B_CALC_MASK EQU 0x0353 ; Instruction Label
|
||||||
|
B_ASSR EQU 0x0378 ; Instruction Label
|
||||||
|
B_CHKSLZ EQU 0x03ac ; Instruction Label
|
||||||
|
B_INIMSX2 EQU 0x0416 ; Instruction Label
|
||||||
|
B_ISCNTC EQU 0x04f0 ; Instruction Label
|
||||||
|
B_HDLCSTOP EQU 0x0521 ; Instruction Label
|
||||||
|
B_CHKONSTOP EQU 0x0549 ; Instruction Label
|
||||||
|
B_KILBUF EQU 0x055d ; Instruction Label
|
||||||
|
B_BREAKX EQU 0x0564 ; Instruction Label
|
||||||
|
B_INITIO EQU 0x0592 ; Instruction Label
|
||||||
|
B_GICINI EQU 0x05b2 ; Instruction Label
|
||||||
|
B_PSG_INI EQU 0x05fd ; Data Label
|
||||||
|
B_ENASCR EQU 0x0603 ; Instruction Label
|
||||||
|
B_DISSCR EQU 0x060a ; Instruction Label
|
||||||
|
B_WRTVDP EQU 0x0612 ; Instruction Label
|
||||||
|
B_INITXT EQU 0x063e ; Instruction Label
|
||||||
|
B_INIT32 EQU 0x0647 ; Instruction Label
|
||||||
|
B_INIGRP EQU 0x064f ; Instruction Label
|
||||||
|
B.INIMLT EQU 0x0657 ; Instruction Label
|
||||||
|
B_SETTXT EQU 0x065f ; Instruction Label
|
||||||
|
B_SETT32 EQU 0x0667 ; Instruction Label
|
||||||
|
B_SETGRP EQU 0x066f ; Instruction Label
|
||||||
|
B_SETMLT EQU 0x0677 ; Instruction Label
|
||||||
|
B_CLRSPR EQU 0x067f ; Instruction Label
|
||||||
|
B_SET_IOR EQU 0x0687 ; Instruction Label
|
||||||
|
B_CVT2VADDR EQU 0x068f ; Instruction Label
|
||||||
|
B_CHKNEW EQU 0x06a9 ; Instruction Label
|
||||||
|
B_NSTWRT EQU 0x06b3 ; Instruction Label
|
||||||
|
B_NSETRD EQU 0x06c5 ; Instruction Label
|
||||||
|
B_CALPAT EQU 0x06ec ; Instruction Label
|
||||||
|
B_CALATR EQU 0x0701 ; Instruction Label
|
||||||
|
B_GSPSIZ EQU 0x070c ; Instruction Label
|
||||||
|
B_ICPT EQU 0x0717 ; Instruction Label
|
||||||
|
B_LDIRMV EQU 0x073d ; Instruction Label
|
||||||
|
B_NWRVRM EQU 0x0769 ; Instruction Label
|
||||||
|
B_CLRSCR EQU 0x0777 ; Instruction Label
|
||||||
|
B_LDIRVM EQU 0x0780 ; Instruction Label
|
||||||
|
B_CPCHCOD EQU 0x07ab ; Instruction Label
|
||||||
|
B_DOCLS EQU 0x07ce ; Instruction Label
|
||||||
|
B_WRTVRM EQU 0x07d7 ; Instruction Label
|
||||||
|
B_RDVRM EQU 0x07e1 ; Instruction Label
|
||||||
|
B_NRDVRM EQU 0x07e9 ; Instruction Label
|
||||||
|
B_SETVDPWR EQU 0x07f1 ; Instruction Label
|
||||||
|
B_SETWRT EQU 0x07f4 ; Instruction Label
|
||||||
|
B_SETRD EQU 0x0808 ; Instruction Label
|
||||||
|
B_CHGCLR EQU 0x081a ; Instruction Label
|
||||||
|
B_BIGFIL EQU 0x0838 ; Instruction Label
|
||||||
|
B_FILVRM EQU 0x083b ; Instruction Label
|
||||||
|
B_CLS EQU 0x0897 ; Instruction Label
|
||||||
|
B_TOTEXT EQU 0x089e ; Instruction Label
|
||||||
|
B_CHGMOD EQU 0x08b1 ; Instruction Label
|
||||||
|
B_LPTOUT EQU 0x08ba ; Instruction Label
|
||||||
|
B_LPTWRB EQU 0x08c9 ; Instruction Label
|
||||||
|
B_LPTSTT EQU 0x08e1 ; Instruction Label
|
||||||
|
B_POSIT EQU 0x08eb ; Instruction Label
|
||||||
|
B_CNVCHR EQU 0x08fa ; Instruction Label
|
||||||
|
B_CHPUT EQU 0x0919 ; Instruction Label
|
||||||
|
B_SCC_LF EQU 0x0965 ; Instruction Label
|
||||||
|
B_ESC_TAB EQU 0x09b0 ; Data Label
|
||||||
|
B_ESC_x EQU 0x09dd ; Instruction Label
|
||||||
|
B_ESC_y EQU 0x09e0 ; Instruction Label
|
||||||
|
B_MV_CUR_YX EQU 0x09e3 ; Instruction Label
|
||||||
|
B_DO_ESC EQU 0x09e6 ; Instruction Label
|
||||||
|
B_ESCX_HDLR EQU 0x0a1b ; Instruction Label
|
||||||
|
B_ESCY_HDLR EQU 0x0a25 ; Instruction Label
|
||||||
|
B_DISP_CURD EQU 0x0a37 ; Instruction Label
|
||||||
|
B_DISP_CURE EQU 0x0a3e ; Instruction Label
|
||||||
|
B_HID_CURD EQU 0x0a84 ; Instruction Label
|
||||||
|
B_HID_CURE EQU 0x0a8b ; Instruction Label
|
||||||
|
B_CUR_RT EQU 0x0aa1 ; Instruction Label
|
||||||
|
B_CUR_LT_LW EQU 0x0aa9 ; Instruction Label
|
||||||
|
B_CUR_LT1 EQU 0x0ab2 ; Instruction Label
|
||||||
|
B_CUR_UP EQU 0x0ab4 ; Instruction Label
|
||||||
|
B_CUR_RT_LW EQU 0x0ab8 ; Instruction Label
|
||||||
|
B_CUR_DN EQU 0x0abe ; Instruction Label
|
||||||
|
B_UPD_CURXY EQU 0x0ac6 ; Instruction Label
|
||||||
|
B_CUR_TAB EQU 0x0ace ; Instruction Label
|
||||||
|
B_CUR_HOME EQU 0x0adc ; Instruction Label
|
||||||
|
B_DO_CUR_CR EQU 0x0ade ; Instruction Label
|
||||||
|
B_DEL_LINE EQU 0x0ae2 ; Instruction Label
|
||||||
|
B_DELLINE EQU 0x0ae5 ; Instruction Label
|
||||||
|
B_INS_LINE EQU 0x0aee ; Instruction Label
|
||||||
|
B_INSLINE EQU 0x0af1 ; Instruction Label
|
||||||
|
B_CUR_LT_LW1 EQU 0x0afa ; Instruction Label
|
||||||
|
B_ESC_L EQU 0x0b03 ; Instruction Label
|
||||||
|
B_DEL2EOL EQU 0x0b05 ; Instruction Label
|
||||||
|
B_WR_SP_EOL EQU 0x0b0d ; Instruction Label
|
||||||
|
B_DEL2EOS EQU 0x0b19 ; Instruction Label
|
||||||
|
B_ERAFNK EQU 0x0b29 ; Instruction Label
|
||||||
|
B_FNKSB EQU 0x0b3a ; Instruction Label
|
||||||
|
B_DSPFNK EQU 0x0b3f ; Instruction Label
|
||||||
|
B_ISINTXT EQU 0x0b4e ; Instruction Label
|
||||||
|
B_CP_CHR_PATTRN EQU 0x0b54 ; Instruction Label
|
||||||
|
B_CP8B2VRAM EQU 0x0b6b ; Instruction Label
|
||||||
|
RD_CHR_SCR EQU 0x0b83 ; Instruction Label
|
||||||
|
B_CVLN_ADDR EQU 0x0b96 ; Instruction Label
|
||||||
|
B_CVSA2VA EQU 0x0b98 ; Instruction Label
|
||||||
|
B_UNM_L EQU 0x0bd9 ; Data Label
|
||||||
|
B_MAXLINENO EQU 0x0be2 ; Instruction Label
|
||||||
|
B_SNSMAT EQU 0x0bec ; Instruction Label
|
||||||
|
B_ISFLIO EQU 0x0bf9 ; Instruction Label
|
||||||
|
B_DCOMPTR EQU 0x0c04 ; Instruction Label
|
||||||
|
B_GETVCP EQU 0x0c0a ; Instruction Label
|
||||||
|
B_GET_VC2 EQU 0x0c0e ; Instruction Label
|
||||||
|
B_KEY_INT EQU 0x0c3c ; Instruction Label
|
||||||
|
B_KB_SCAN_TR EQU 0x0d4e ; Instruction Label
|
||||||
|
B_CHK_KB_EMP EQU 0x0d62 ; Instruction Label
|
||||||
|
B_CHSNS EQU 0x0d6a ; Instruction Label
|
||||||
|
B_CVT2SCAN EQU 0x0d89 ; Instruction Label
|
||||||
|
B_SCANTAB EQU 0x0da5 ; Data Label
|
||||||
|
B_SCAN_NUM_S EQU 0x0dc9 ; Data Label
|
||||||
|
B_KEYH_PTRS EQU 0x0dd3 ; Data Label
|
||||||
|
D0DE3 EQU 0x0dE3 ; Data Label
|
||||||
|
B_KEYH_PTH_O EQU 0x0ddb ; Data Label
|
||||||
|
B_K_HAND EQU 0x0e3b ; Instruction Label
|
||||||
|
B_HK_DIGITS EQU 0x0e67 ; Instruction Label
|
||||||
|
B_HK_AZ EQU 0x0e7e ; Instruction Label
|
||||||
|
B_HK_AZ_S_NCTR EQU 0x0e93 ; Instruction Label
|
||||||
|
B_HK_AZ_NS_NCTR EQU 0x0e95 ; Instruction Label
|
||||||
|
B_HK_OTHER EQU 0x0ea1 ; Instruction Label
|
||||||
|
B_HK_FNKEYS EQU 0x0ebb ; Instruction Label
|
||||||
|
B_RES_FNHDL EQU 0x0ec5 ; Instruction Label
|
||||||
|
B_RAISE_TRAP EQU 0x0ef1 ; Instruction Label
|
||||||
|
B_HK_HOME EQU 0x0f06 ; Instruction Label
|
||||||
|
B_HK_EASY EQU 0x0f10 ; Instruction Label
|
||||||
|
B_HK_DEAD EQU 0x0f1f ; Instruction Label
|
||||||
|
B_HL_CAPS EQU 0x0f36 ; Instruction Label
|
||||||
|
B_CHGCAP EQU 0x0f3d ; Instruction Label
|
||||||
|
B_PUT_KEYCODE EQU 0x0f55 ; Instruction Label
|
||||||
|
B_MK_KEYCLICK EQU 0x0f64 ; Instruction Label
|
||||||
|
B_CHGSND EQU 0x0f7a ; Instruction Label
|
||||||
|
B_HND_KANA EQU 0x0f83 ; Instruction Label
|
||||||
|
B_LO_ANSI_NS_CS EQU 0x0fbd ; Data Label
|
||||||
|
B_LO_ANSI_S_CS EQU 0x0fed ; Data Label
|
||||||
|
B_LO_JIS_NS_CS EQU 0x101d ; Data Label
|
||||||
|
B_LO_JIS_S_CS EQU 0x104d ; Data Label
|
||||||
|
M_HK_GRAPH EQU 0x107d ; Instruction Label
|
||||||
|
B_LO_GRAPH EQU 0x1092 ; Data Label
|
||||||
|
B_CHGET EQU 0x10cb ; Instruction Label
|
||||||
|
B_CKCNTC EQU 0x10f9 ; Instruction Label
|
||||||
|
WRT_PSG EQU 0x1102 ; Instruction Label
|
||||||
|
RD_PSG EQU 0x110e ; Instruction Label
|
||||||
|
B_BEEP EQU 0x1113 ; Instruction Label
|
||||||
|
B_STRTMS EQU 0x11ba ; Instruction Label
|
||||||
|
B_GTSTCK EQU 0x11e4 ; Instruction Label
|
||||||
|
B_GTTRIG EQU 0x1249 ; Instruction Label
|
||||||
|
B_GTPDL EQU 0x1269 ; Instruction Label
|
||||||
|
B_GTPAD EQU 0x12a2 ; Instruction Label
|
||||||
|
B_STMOTR EQU 0x1387 ; Instruction Label
|
||||||
|
B_NMI_HND EQU 0x139b ; Instruction Label
|
||||||
|
B_INI_FNK EQU 0x13a0 ; Instruction Label
|
||||||
|
MSG_GN_STR1 EQU 0x13c3 ; Data Label
|
||||||
|
B_RDVDP EQU 0x140b ; Instruction Label
|
||||||
|
B_RSLREG EQU 0x140e ; Instruction Label
|
||||||
|
B_WSLREG EQU 0x1411 ; Instruction Label
|
||||||
|
B_PHYDIO EQU 0x1414 ; Instruction Label
|
||||||
|
B_FORMAT EQU 0x1418 ; Instruction Label
|
||||||
|
B_RDBTST EQU 0x146a ; Instruction Label
|
||||||
|
B_WRBTST EQU 0x146e ; Instruction Label
|
||||||
|
B_PUTQ EQU 0x1490 ; Instruction Label
|
||||||
|
B_LFTQ EQU 0x14e9 ; Instruction Label
|
||||||
|
GRP_PRT EQU 0x150e ; Instruction Label
|
||||||
|
B_SCALXY EQU 0x15a5 ; Instruction Label
|
||||||
|
B_MAPXYC EQU 0x1604 ; Instruction Label
|
||||||
|
B_FETCHC EQU 0x1651 ; Instruction Label
|
||||||
|
B_STOREC EQU 0x1658 ; Instruction Label
|
||||||
|
B_READC EQU 0x165f ; Instruction Label
|
||||||
|
B_SETATR EQU 0x1692 ; Instruction Label
|
||||||
|
B_SETC EQU 0x16c3 ; Instruction Label
|
||||||
|
B_TRIGHT EQU 0x1735 ; Instruction Label
|
||||||
|
B_RIGHTC EQU 0x1756 ; Instruction Label
|
||||||
|
B_TLEFTC EQU 0x1771 ; Instruction Label
|
||||||
|
B_LEFTC EQU 0x1790 ; Instruction Label
|
||||||
|
B_TDOWNC EQU 0x17b4 ; Instruction Label
|
||||||
|
B_DOWNC EQU 0x17dc ; Instruction Label
|
||||||
|
B_TUPC EQU 0x17f6 ; Instruction Label
|
||||||
|
B_UPC EQU 0x181f ; Instruction Label
|
||||||
|
B_NSETCX EQU 0x1843 ; Instruction Label
|
||||||
|
B_GTASPC EQU 0x1901 ; Instruction Label
|
||||||
|
B_PNTINI EQU 0x1909 ; Instruction Label
|
||||||
|
B_SCANR EQU 0x191e ; Instruction Label
|
||||||
|
B_SCANL EQU 0x1994 ; Instruction Label
|
||||||
|
B_TAPOUTOFF EQU 0x19dd ; Instruction Label
|
||||||
|
B_TAPINOFF EQU 0x19e9 ; Instruction Label
|
||||||
|
B_TAPOUTON EQU 0x19f1 ; Instruction Label
|
||||||
|
B_TAPOUT EQU 0x1a19 ; Instruction Label
|
||||||
|
B_TAPINON EQU 0x1a63 ; Instruction Label
|
||||||
|
B_TAPIN EQU 0x1abc ; Instruction Label
|
||||||
|
B_OUTDO EQU 0x1b45 ; Instruction Label
|
||||||
|
B_OUTDLP EQU 0x1b63 ; Instruction Label
|
||||||
|
CHAR_TABL EQU 0x1bbf ; Data Label
|
||||||
|
B_PINLINE EQU 0x23bf ; Instruction Label
|
||||||
|
B_QINLIN EQU 0x23cc ; Instruction Label
|
||||||
|
B_INLIN EQU 0x23d5 ; Instruction Label
|
||||||
|
B_HK_ESC EQU 0x23fe ; Instruction Label
|
||||||
|
B_SK_HNDL_TAB EQU 0x2439 ; Data Label
|
||||||
|
B_HK_RET EQU 0x245a ; Instruction Label
|
||||||
|
B_HK_CTRLC EQU 0x24c5 ; Instruction Label
|
||||||
|
B_HK_INSRT EQU 0x24e5 ; Instruction Label
|
||||||
|
B_HK_DELETE EQU 0x2550 ; Instruction Label
|
||||||
|
B_HK_BKSP EQU 0x2561 ; Instruction Label
|
||||||
|
B_HK_CTRLU EQU 0x25ae ; Instruction Label
|
||||||
|
B_HK_CTRLE EQU 0x25b9 ; Instruction Label
|
||||||
|
B_HK_CTRLN EQU 0x25d7 ; Instruction Label
|
||||||
|
B_HK_CTRLF EQU 0x25f8 ; Instruction Label
|
||||||
|
B_HK_CTRLB EQU 0x260e ; Instruction Label
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
FIRSTLINE EQU 0x8008 ; first basic line
|
||||||
|
|
||||||
|
; ---------------------------------------------------
|
||||||
|
; User RAM Area
|
||||||
|
; ---------------------------------------------------
|
||||||
|
MB_TSTACK EQU 0xf376 ; Data Label
|
||||||
|
|
||||||
|
DISKSYS EQU 0xf37d ; Data Label
|
||||||
|
|
||||||
|
VARWRK EQU 0xf380
|
||||||
|
; ---------------------------------------------------
|
||||||
|
; System RAM Area
|
||||||
|
; ---------------------------------------------------
|
||||||
|
RDPRIM EQU 0xf380 ; Data Label
|
||||||
|
WRPRIM EQU 0xf385 ; Data Label
|
||||||
|
CLPRIM EQU 0xf38c ; Data Label
|
||||||
|
CLPRM1 EQU 0xf398 ; Instruction Label
|
||||||
|
USRTAB EQU 0xf39a ; Data Label
|
||||||
|
LINL40 EQU 0xf3ae ; Data Label
|
||||||
|
LINL32 EQU 0xf3af ; Data Label
|
||||||
|
LINLEN EQU 0xf3b0 ; Data Label
|
||||||
|
CRTCNT EQU 0xf3b1 ; Data Label
|
||||||
|
CLMLST EQU 0xf3b2 ; Data Label
|
||||||
|
TXTNAM EQU 0xf3b3 ; Data Label
|
||||||
|
TXTCOL EQU 0xf3b5 ; Data Label
|
||||||
|
TXTCGP EQU 0xf3b7 ; Data Label
|
||||||
|
TXTATR EQU 0xf3b9 ; Data Label
|
||||||
|
TXTPAT EQU 0xf3bb ; Data Label
|
||||||
|
T32NAM EQU 0xf3bd ; Data Label
|
||||||
|
T32COL EQU 0xf3bf ; Data Label
|
||||||
|
T32CGP EQU 0xf3c1 ; Data Label
|
||||||
|
T32ATR EQU 0xf3c3 ; Data Label
|
||||||
|
T32PAT EQU 0xf3c5 ; Data Label
|
||||||
|
GRPNAM EQU 0xf3c7 ; Data Label
|
||||||
|
GRPCOL EQU 0xf3c9 ; Data Label
|
||||||
|
GRPCGP EQU 0xf3cb ; Data Label
|
||||||
|
GRPATR EQU 0xf3cd ; Data Label
|
||||||
|
GRPPAT EQU 0xf3cf ; Data Label
|
||||||
|
MLTNAM EQU 0xf3d1 ; Data Label
|
||||||
|
MLTCOL EQU 0xf3d3 ; Data Label
|
||||||
|
MLTCGP EQU 0xf3d5 ; Data Label
|
||||||
|
MLTATR EQU 0xf3d7 ; Data Label
|
||||||
|
MLTPAT EQU 0xf3d9 ; Data Label
|
||||||
|
CLIKSW EQU 0xf3db ; Data Label
|
||||||
|
CRY EQU 0xf3dc ; Data Label
|
||||||
|
CSRX EQU 0xf3dd ; Data Label
|
||||||
|
CNSDFG EQU 0xf3de ; Data Label
|
||||||
|
RG0SAV EQU 0xf3df ; Data Label
|
||||||
|
RG1SAV EQU 0xf3e0 ; Data Label
|
||||||
|
RG2SAV EQU 0xf3e1 ; Data Label
|
||||||
|
RG3SAV EQU 0xf3e2 ; Data Label
|
||||||
|
RG4SAV EQU 0xf3e3 ; Data Label
|
||||||
|
RG5SAV EQU 0xf3e4 ; Data Label
|
||||||
|
RG6SAV EQU 0xf3e5 ; Data Label
|
||||||
|
RG7SAV EQU 0xf3e6 ; Data Label
|
||||||
|
STATFL EQU 0xf3e7 ; Data Label
|
||||||
|
TRGFLG EQU 0xf3e8 ; Data Label
|
||||||
|
FORCLR EQU 0xf3e9 ; Data Label
|
||||||
|
BAKCLR EQU 0xf3ea ; Data Label
|
||||||
|
BDRCLR EQU 0xf3eb ; Data Label
|
||||||
|
MAXUPD EQU 0xf3ec
|
||||||
|
MINUPD EQU 0xf3ef
|
||||||
|
ATRBYT EQU 0xf3f2 ; Graphics foreground ink color def: 15 - White
|
||||||
|
FRCNEW EQU 0xf3f5
|
||||||
|
SCNCNT EQU 0xf3f6 ; Data Label
|
||||||
|
REPCNT EQU 0xf3f7 ; Data Label
|
||||||
|
PUTPNT EQU 0xf3f8 ; Data Label
|
||||||
|
GETPNT EQU 0xf3fa ; Data Label
|
||||||
|
CS1200 EQU 0xf3fc ; 5b cassette tape I/O parameters for the 1200 baud data transfer rate
|
||||||
|
CSLOW EQU 0xf406 ; 2b cassete timing pulse/signal delays
|
||||||
|
|
||||||
|
VSYS.SIZE EQU CSLOW - RDPRIM
|
||||||
|
|
||||||
|
; ---------------------------------------------------
|
||||||
|
; BASIC Variables
|
||||||
|
; ---------------------------------------------------
|
||||||
|
MB_ENDPRG EQU 0xf40f ; Data Label
|
||||||
|
MB_ERRFLG EQU 0xf414 ; Data Label
|
||||||
|
MB_LPTSIZ EQU 0xf415 ; Data Label
|
||||||
|
MB_PRTFLG EQU 0xf416 ; Data Label
|
||||||
|
NTMSXP EQU 0xf417 ; Type of printer connected
|
||||||
|
MB_VLZADDR EQU 0xf419 ; Data Label
|
||||||
|
MB_VLZDAT EQU 0xf41b ; Data Label
|
||||||
|
MB_CURLIN EQU 0xf41c ; Data Label
|
||||||
|
MB_KBFMIN EQU 0xf41e ; Data Label
|
||||||
|
MB_KBUF EQU 0xf41f ; Data Label
|
||||||
|
MB_BUFMIN EQU 0xf55d ; Data Label
|
||||||
|
MB_BUF EQU 0xf55e ; Data Label
|
||||||
|
BOTTOM EQU 0xf65e ; Starting memory address of the MSX-BASIC program area
|
||||||
|
MB_ENDBUF EQU 0xf660 ; Data Label
|
||||||
|
MB_TTYPOS EQU 0xf661 ; Data Label
|
||||||
|
MB_DIMFLG EQU 0xf662 ; Data Label
|
||||||
|
MB_VALTYP EQU 0xf663 ; Data Label
|
||||||
|
MB_OPRTYP EQU 0xf664 ; Data Label
|
||||||
|
MB_DORES EQU 0xf665 ; Data Label
|
||||||
|
MB_CONTXT EQU 0xf666 ; Data Label
|
||||||
|
MB_CONSAV EQU 0xf668 ; Data Label
|
||||||
|
MB_CONTYP EQU 0xf669 ; Data Label
|
||||||
|
MB_CONLO EQU 0xf66a ; Data Label
|
||||||
|
MB_MEMSIZ EQU 0xf672 ; Data Label
|
||||||
|
MB_STKTOP EQU 0xf674 ; Data Label
|
||||||
|
MB_TXTTAB EQU 0xf676 ; Data Label
|
||||||
|
MB_TEMPP EQU 0xf678 ; Data Label
|
||||||
|
MB_TEMPST EQU 0xf67a ; Data Label
|
||||||
|
MB_DSCTMP EQU 0xf698 ; Data Label
|
||||||
|
MB_FRETOP EQU 0xf69b ; Data Label
|
||||||
|
MB_TEMP3 EQU 0xf69d ; Data Label
|
||||||
|
MB_CPMFIL EQU 0xf69f ; Data Label
|
||||||
|
MB_ENDFOR EQU 0xf6a1 ; Data Label
|
||||||
|
MB_DATLIN EQU 0xf6a3 ; Data Label
|
||||||
|
MB_SUBFLG EQU 0xf6a5 ; Data Label
|
||||||
|
MB_FLGINP EQU 0xf6a6 ; Data Label
|
||||||
|
MB_TEMP EQU 0xf6a7 ; Data Label
|
||||||
|
MB_PTRFLG EQU 0xf6a9 ; Data Label
|
||||||
|
MB_AUTFLG EQU 0xf6aa ; Data Label
|
||||||
|
MB_AUTLIN EQU 0xf6ab ; Data Label
|
||||||
|
MB_AUTINC EQU 0xf6ad ; Data Label
|
||||||
|
MB_SAVTXT EQU 0xf6af ; Data Label
|
||||||
|
MB_SAVSTK EQU 0xf6b1 ; Data Label
|
||||||
|
MB_ERRLIN EQU 0xf6b3 ; Data Label
|
||||||
|
MB_DOT EQU 0xf6b5 ; Data Label
|
||||||
|
MB_ERRTXT EQU 0xf6b7 ; Data Label
|
||||||
|
MB_ONELIN EQU 0xf6b9 ; Data Label
|
||||||
|
MB_ONEFLG EQU 0xf6bb ; Data Label
|
||||||
|
MB_TEMP2 EQU 0xf6bc ; Data Label
|
||||||
|
MB_OLDLIN EQU 0xf6be ; Data Label
|
||||||
|
MB_OLDTXT EQU 0xf6c0 ; Data Label
|
||||||
|
MB_VARTAB EQU 0xf6c2 ; Data Label
|
||||||
|
MB_ARYTAB EQU 0xf6c4 ; Data Label
|
||||||
|
MB_STREND EQU 0xf6c6 ; Data Label
|
||||||
|
MB_DATPTR EQU 0xf6c8 ; Data Label
|
||||||
|
MB_DEFTBL EQU 0xf6ca ; Data Label
|
||||||
|
MB_PRMSTK EQU 0xf6e4 ; Data Label
|
||||||
|
MB_PRMLEN EQU 0xf6e6 ; Data Label
|
||||||
|
MB_PARM1 EQU 0xf6e8 ; Data Label
|
||||||
|
MB_PRMPRV EQU 0xf74c ; Data Label
|
||||||
|
MB_PRMLN2 EQU 0xf74e ; Data Label
|
||||||
|
MB_PARM2 EQU 0xf750 ; Data Label
|
||||||
|
MB_PRMFLG EQU 0xf7b4 ; Data Label
|
||||||
|
MB_ARYTA2 EQU 0xf7b5 ; Data Label
|
||||||
|
MB_NOFUNS EQU 0xf7b7 ; Data Label
|
||||||
|
MB_TEMP9 EQU 0xf7b8 ; Data Label
|
||||||
|
MB_CHNFLG EQU 0xf7b9 ; Data Label
|
||||||
|
MB_CHNLIN EQU 0xf7ba ; Data Label
|
||||||
|
MB_SWPTMP EQU 0xf7bc ; Data Label
|
||||||
|
MB_TRCFLG EQU 0xf7c4 ; Data Label
|
||||||
|
MB_FBUFFR EQU 0xf7c5 ; Data Label
|
||||||
|
MB_DECTMP EQU 0xf7f0 ; Data Label
|
||||||
|
MB_DECTM2 EQU 0xf7f2 ; Data Label
|
||||||
|
MB_DECCNT EQU 0xf7f4 ; Data Label
|
||||||
|
MB_DACC EQU 0xf7f6 ; Data Label
|
||||||
|
HOLD8 EQU 0xf806 ; Data Label
|
||||||
|
MB_ARG EQU 0xf847 ; Data Label
|
||||||
|
MB_RNDX EQU 0xf857 ; Data Label
|
||||||
|
MB_MAXFIL EQU 0xf85f ; Data Label
|
||||||
|
MB_FILTAB EQU 0xf860 ; Data Label
|
||||||
|
MB_NULBUF EQU 0xf862 ; Data Label
|
||||||
|
MB_PTRFIL EQU 0xf864 ; Data Label
|
||||||
|
MB_FILNAM EQU 0xf866 ; Data Label
|
||||||
|
MB_NLONLY EQU 0xf87c ; Data Label
|
||||||
|
MB_SAVEND EQU 0xf87d ; Data Label
|
||||||
|
MB_FNKSTR EQU 0xf87f ; Data Label
|
||||||
|
MB_CGPNT EQU 0xf91f ; Data Label
|
||||||
|
CGPBAS EQU 0xf924 ; Data Label
|
||||||
|
PATBAS EQU 0xf926 ; Data Label
|
||||||
|
ATRBAS EQU 0xf928 ; Data Label
|
||||||
|
MB_MINDEL EQU 0xf92d ; Data Label
|
||||||
|
MB_MAXDEL EQU 0xf92f ; Data Label
|
||||||
|
MB_ASPECT EQU 0xf931 ; Data Label
|
||||||
|
MB_CENCNT EQU 0xf933 ; Data Label
|
||||||
|
MB_CELINEF EQU 0xf935 ; Data Label
|
||||||
|
MB_CNPNTS EQU 0xf936 ; Data Label
|
||||||
|
MB_CPLOTF EQU 0xf938 ; Data Label
|
||||||
|
MB_CPCNT EQU 0xf939 ; Data Label
|
||||||
|
MB_CPCNT8 EQU 0xf93b ; Data Label
|
||||||
|
MB_CRCSUM EQU 0xf93d ; Data Label
|
||||||
|
MB_CSTCNT EQU 0xf93f ; Data Label
|
||||||
|
MV_CSCLXY EQU 0xf941 ; Data Label
|
||||||
|
MB_CSAVEA EQU 0xf942 ; Data Label
|
||||||
|
MB_CSAVEM EQU 0xf944 ; Data Label
|
||||||
|
MB_CXOFF EQU 0xf945 ; Data Label
|
||||||
|
MB_CYOFF EQU 0xf947 ; Data Label
|
||||||
|
MB_LOHMSK EQU 0xf949 ; Data Label
|
||||||
|
MB_LOHDIR EQU 0xf94a ; Data Label
|
||||||
|
MB_LOHADR EQU 0xf94b ; Data Label
|
||||||
|
MB_LOHCNT EQU 0xf94d ; Data Label
|
||||||
|
MB_SKPCNT EQU 0xf94f ; Data Label
|
||||||
|
MB_MOVCNT EQU 0xf951 ; Data Label
|
||||||
|
MB_PDIREC EQU 0xf953 ; Data Label
|
||||||
|
MB_LFPROG EQU 0xf954 ; Data Label
|
||||||
|
MB_RTPROG EQU 0xf955 ; Data Label
|
||||||
|
MB_MCLTAB EQU 0xf956 ; Data Label
|
||||||
|
MB_MCLFLG EQU 0xf958 ; Data Label
|
||||||
|
MB_QUETAB EQU 0xf959 ; Data Label
|
||||||
|
ACPAGE EQU 0xfaf6 ; Data Label
|
||||||
|
MODE EQU 0xfafc ; Data Label
|
||||||
|
MB_PRSCNT EQU 0xfb35 ; Data Label
|
||||||
|
MB_SAVSP EQU 0xfb36 ; Data Label
|
||||||
|
MB_VOICEN EQU 0xfb38 ; Data Label
|
||||||
|
MB_SAVVOL EQU 0xfb39 ; Data Label
|
||||||
|
MB_MCLLEN EQU 0xfb3b ; Data Label
|
||||||
|
MB_MCLPTR EQU 0xfb3c ; Data Label
|
||||||
|
MB_MUSICF EQU 0xfb3f ; Data Label
|
||||||
|
MB_PLYCNT EQU 0xfb40 ; Data Label
|
||||||
|
ENSTOP EQU 0xfbb0 ; Data Label
|
||||||
|
MB_BASROM EQU 0xfbb1 ; Data Label
|
||||||
|
FNKSWI EQU 0xfbcd ; Data Label
|
||||||
|
MB_FNKFLG EQU 0xfbce ; Data Label
|
||||||
|
MB_ONGSBF EQU 0xfbd8 ; Data Label
|
||||||
|
CLIKFL EQU 0xfbd9 ; Data Label
|
||||||
|
OLDKEY EQU 0xfbda ; Data Label
|
||||||
|
MB_NEWKEY EQU 0xfbe5 ; Data Label
|
||||||
|
MB_KEYBUF EQU 0xfbf0 ; Data Label
|
||||||
|
MB_LINWRK EQU 0xfc18 ; Data Label
|
||||||
|
MB_PATWRK EQU 0xfc40 ; Data Label
|
||||||
|
MB_BOTTOM EQU 0xfc48 ; Data Label
|
||||||
|
MB_HIMEM EQU 0xfc4a ; Data Label
|
||||||
|
MB_TRPTBL EQU 0xfc4c ; Data Label
|
||||||
|
MB_INTFLG EQU 0xfc9b ; Data Label
|
||||||
|
MB_PADY EQU 0xfc9c ; Data Label
|
||||||
|
MB_PADX EQU 0xfc9d ; Data Label
|
||||||
|
MB_JIFFY EQU 0xfc9e ; Data Label
|
||||||
|
MB_INTVAL EQU 0xfca0 ; Data Label
|
||||||
|
MB_INTCNT EQU 0xfca2 ; Data Label
|
||||||
|
MB_LOWLIM EQU 0xfca4 ; Data Label
|
||||||
|
MB_WINWID EQU 0xfca5 ; Data Label
|
||||||
|
MB_GRPHED EQU 0xfca6 ; Data Label
|
||||||
|
MB_ESCCNT EQU 0xfca7 ; Data Label
|
||||||
|
MB_CSRSW EQU 0xfca9 ; Data Label
|
||||||
|
CSTYLE EQU 0xfcaa ; Data Label
|
||||||
|
MB_CAPST EQU 0xfcab ; Data Label
|
||||||
|
MB_KANAST EQU 0xfcac ; Data Label
|
||||||
|
MB_KANAMD EQU 0xfcad ; Data Label
|
||||||
|
MB_FLBMEM EQU 0xfcae ; Data Label
|
||||||
|
SCRMOD EQU 0xfcaf ; Data Label
|
||||||
|
OLDSCR EQU 0xfcb0 ; Data Label
|
||||||
|
CASS_BUFF EQU 0xfcb1 ; Data Label
|
||||||
|
MB_GXPOS EQU 0xfcb3 ; Data Label
|
||||||
|
MB_GYPOS EQU 0xfcb5 ; Data Label
|
||||||
|
MB_GRPACX EQU 0xfcb7 ; Data Label
|
||||||
|
MB_GRPACY EQU 0xfcb9 ; Data Label
|
||||||
|
MB_DRWFLG EQU 0xfcbb ; Data Label
|
||||||
|
MB_DRWSCL EQU 0xfcbc ; Data Label
|
||||||
|
MB_DRWANG EQU 0xfcbd ; Data Label
|
||||||
|
MB_RUNBNF EQU 0xfcbe ; Data Label
|
||||||
|
MB_SAVENT EQU 0xfcbf ; Data Label
|
||||||
|
MB_EXPTBL EQU 0xfcc1 ; Data Label
|
||||||
|
MB_SLTTBL EQU 0xfcc5 ; Data Label
|
||||||
|
MB_SLTADR EQU 0xfcc9 ; Data Label
|
||||||
|
MB_SLTWRK EQU 0xfd09 ; Data Label
|
||||||
|
MB_PROCNM EQU 0xfd89 ; Data Label
|
||||||
|
MB_DEVICE EQU 0xfd99 ; Data Label
|
||||||
|
|
||||||
|
; --------------------------------------------------
|
||||||
|
; SYS Vars
|
||||||
|
; --------------------------------------------------
|
||||||
|
EXTBIO EQU 0xffca ; Data Label
|
||||||
|
HBGFD EQU 0xffcf ; Data Label
|
||||||
|
HENFD EQU 0xffd4 ; Data Label
|
||||||
|
RG08SAV EQU 0xffe7 ; Data Label
|
||||||
|
RG09SAV EQU 0xffe8 ; Data Label
|
||||||
|
RG10SAV EQU 0xffe9 ; Data Label
|
||||||
|
RG11SAV EQU 0xffea ; Data Label
|
||||||
|
RG12SAV EQU 0xffeb ; Data Label
|
||||||
|
RG13SAV EQU 0xffec ; Data Label
|
||||||
|
RG14SAV EQU 0xffed ; Data Label
|
||||||
|
RG15SAV EQU 0xffee ; Data Label
|
||||||
|
RG16SAV EQU 0xffef ; Data Label
|
||||||
|
RG17SAV EQU 0xfff0 ; Data Label
|
||||||
|
RG18SAV EQU 0xfff1 ; Data Label
|
||||||
|
RG19SAV EQU 0xfff2 ; Data Label
|
||||||
|
RG20SAV EQU 0xfff3 ; Data Label
|
||||||
|
RG21SAV EQU 0xfff4 ; Data Label
|
||||||
|
RG22SAV EQU 0xfff5 ; Data Label
|
||||||
|
RG23SAV EQU 0xfff6 ; Data Label
|
||||||
|
SSSR EQU 0xffff ; Secondary Slot Selector Register
|
||||||
@@ -0,0 +1,348 @@
|
|||||||
|
; ===================================================
|
||||||
|
; Microsoft BASIC v2 for MSX System v 3.0
|
||||||
|
;
|
||||||
|
; BASIC RAM hooks
|
||||||
|
; Disassembled by Romychs @ 2026-09-15
|
||||||
|
; ===================================================
|
||||||
|
|
||||||
|
MODULE HOOK
|
||||||
|
|
||||||
|
; Called at the beginning of the KEYINT interrupt routine
|
||||||
|
HKEYI EQU 0xfd9a
|
||||||
|
|
||||||
|
; Called by the KEYINT interrupt routine when Vblank interrupt occurs
|
||||||
|
HTIMI EQU 0xfd9f
|
||||||
|
|
||||||
|
; Called at the beginning of the routine CHPUT (Main-ROM at 00A2h) to display a character on the screen.
|
||||||
|
HCHPU EQU 0xfda4
|
||||||
|
|
||||||
|
; Called at the beginning of internal routine DSPCSR that displays the cursor.
|
||||||
|
HDSPC EQU 0xfda9
|
||||||
|
|
||||||
|
; Called at the beginning of internal routine ERACSR that erases the cursor.
|
||||||
|
HERAC EQU 0xfdae
|
||||||
|
|
||||||
|
; Called at the beginning of the routines DSPFNK (Main-ROM at 00CFh) that displays the contents of the function keys.
|
||||||
|
HDSPF EQU 0xfdb3
|
||||||
|
|
||||||
|
; Called at the beginning of the routine ERAFNK (Main-ROM at 00CCh) to erase the text of fonction keys.
|
||||||
|
HERAF EQU 0xfdb8
|
||||||
|
|
||||||
|
; Called at the beginning of the routine TOTEXT (Main-ROM at 00D2h) to back into text mode.
|
||||||
|
HTOTE EQU 0xfdbd
|
||||||
|
|
||||||
|
; Called at the beginning of the routine CHGET (Main-ROM at 009Fh) to read a character on the keyboard.
|
||||||
|
HCHGE EQU 0xfdc2
|
||||||
|
|
||||||
|
; Called at the beginning of internal routine INIPAT that initializes characters font in VRAM.
|
||||||
|
HINIP EQU 0xfdc7
|
||||||
|
|
||||||
|
; Called at the beginning of internal routine KEYCOD of keyboard reading
|
||||||
|
HKEYC EQU 0xfdcc
|
||||||
|
|
||||||
|
; Called at the beginning of internal routine KYEASY that decodes the keyboard.
|
||||||
|
HKYEA EQU 0xfdd1
|
||||||
|
|
||||||
|
; Called at the beginning of non-maskable interrupts routine (Main-ROM at 0066h).
|
||||||
|
HNMI EQU 0xfdd6
|
||||||
|
|
||||||
|
; Called at the beginning of Bios routine PINLIN (Main-ROM at 00AEh) that manages the input of a program line to the keyboard.
|
||||||
|
HPINL EQU 0xfddb
|
||||||
|
|
||||||
|
; Called at the beginning of Bios routine QINLIN (Main-ROM at 00B4h) that manages the line input with LINEINPUT instruction of Basic.
|
||||||
|
HQINL EQU 0xfde0
|
||||||
|
|
||||||
|
; Called at the beginning of Bios routine INLIN (Main-ROM at 000B1h) that store the entered characters until STOP or RET key is pressed.
|
||||||
|
HINLI EQU 0xfde5
|
||||||
|
|
||||||
|
; Called at the beginning of the system routine that manages the Basic instructions like ON GOTO, ON GOSUB.
|
||||||
|
HONGO EQU 0xfdea
|
||||||
|
|
||||||
|
; Called at the beginning of Basic instruction DSKO$.
|
||||||
|
HDSKO EQU 0xfdef
|
||||||
|
|
||||||
|
; Called at the beginning of Basic instruction SET.
|
||||||
|
HSETS EQU 0xfdf4
|
||||||
|
|
||||||
|
; Called at the beginning of Basic instruction NAME.
|
||||||
|
HNAME EQU 0xfdf9
|
||||||
|
|
||||||
|
; Called at the beginning of Basic instruction KILL.
|
||||||
|
HKILL EQU 0xfdfe
|
||||||
|
|
||||||
|
; Called at the beginning of Basic instruction IPL.
|
||||||
|
HIPL EQU 0xfe03
|
||||||
|
|
||||||
|
; Called at the beginning of Basic instruction COPY.
|
||||||
|
HCOPY EQU 0xfe08
|
||||||
|
|
||||||
|
; Called at the beginning of Basic instruction CMD.
|
||||||
|
HCMD EQU 0xfe0d
|
||||||
|
|
||||||
|
; Called at the beginning of Basic instruction DSKF$.
|
||||||
|
HDSKF EQU 0xfe12
|
||||||
|
|
||||||
|
; Called at the beginning of Basic instruction DSKI$.
|
||||||
|
HDSKI EQU 0xfe17
|
||||||
|
|
||||||
|
; Called at the beginning of Basic instruction ATTR$.
|
||||||
|
HATTR EQU 0xfe1c
|
||||||
|
|
||||||
|
; Called at the beginning of Basic instruction LSET$.
|
||||||
|
HLSET EQU 0xfe21
|
||||||
|
|
||||||
|
; Called at the beginning of Basic instruction RSET$.
|
||||||
|
HRSET EQU 0xfe26
|
||||||
|
|
||||||
|
; Called at the beginning of Basic instruction FIELD.
|
||||||
|
HFIEL EQU 0xfe2b
|
||||||
|
|
||||||
|
; Called at the beginning of Basic instruction MKI$.
|
||||||
|
HMKI EQU 0xfe30
|
||||||
|
|
||||||
|
; Called at the beginning of Basic instruction MKS$.
|
||||||
|
HMKS EQU 0xfe35
|
||||||
|
|
||||||
|
; Called at the beginning of Basic instruction MKD$.
|
||||||
|
HMKD EQU 0xfe3a
|
||||||
|
|
||||||
|
; Called at the beginning of Basic instruction CVI$.
|
||||||
|
HCVI EQU 0xfe3f
|
||||||
|
|
||||||
|
; Called at the beginning of Basic instruction CVS$.
|
||||||
|
HCVS EQU 0xfe44
|
||||||
|
|
||||||
|
; Called at the beginning of Basic instruction CVD.
|
||||||
|
HCVD EQU 0xfe49
|
||||||
|
|
||||||
|
; Called at the beginning of the routine GETPTR ("GET file PoinTeR"), positioning on a file
|
||||||
|
HGETP EQU 0xfe4e
|
||||||
|
|
||||||
|
; Called at the beginning of the routine SETFIL ("SET FILe"), position a pointer on a previously opened file.
|
||||||
|
HSETF EQU 0xfe53
|
||||||
|
|
||||||
|
; Called at the beginning of the routine NOFOR ("NO FOR clause"), used by Basic instruction OPEN of Basic.
|
||||||
|
HNOFO EQU 0xfe58
|
||||||
|
|
||||||
|
; Called at the beginning of the routine NULOPN ("NULl file OPen"), used by Basic instructions LOAD, KILL, MERGE, etc.
|
||||||
|
HNULO EQU 0xfe5d
|
||||||
|
|
||||||
|
; Called at the beginning of the routine NTFL0 ("NoT FiLe number 0"), used by Basic instructions LOAD, KILL, MERGE, etc.
|
||||||
|
HNTFL EQU 0xfe62
|
||||||
|
|
||||||
|
; Called at the beginning of the MERGE ("MERGE program files") routine, used by Basic instructions MERGE and LOAD.
|
||||||
|
HMERG EQU 0xfe67
|
||||||
|
|
||||||
|
; Called at the beginning of the routine SAVE, used by Basic instruction SAVE.
|
||||||
|
HSAVE EQU 0xfe6c
|
||||||
|
|
||||||
|
; Called at the beginning of the routine BINSAV ("BINary SAVe") used by the instruction SAVE of Basic.
|
||||||
|
HBINS EQU 0xfe71
|
||||||
|
|
||||||
|
; Called at the beginning of internal routine BINLOD ("BINary LOaD") used by the instruction LOAD of Basic.
|
||||||
|
HBINL EQU 0xfe76
|
||||||
|
|
||||||
|
; Called at the beginning of Basic instruction FILES.
|
||||||
|
HFILE EQU 0xfe7b
|
||||||
|
|
||||||
|
; Called at the beginning of internal routine DGET, used by the basic instruction GET/PUT.
|
||||||
|
HDGET EQU 0xfe80
|
||||||
|
|
||||||
|
; Called at the beginning of internal routine FILOU1 of file output.
|
||||||
|
HFILO EQU 0xfe85
|
||||||
|
|
||||||
|
; Called at the beginning of the internal routine INDSKC of disk attribute input.
|
||||||
|
HINDS EQU 0xfe8a
|
||||||
|
|
||||||
|
; Called at the beginning of the internal routine of re-selection of previous drive.
|
||||||
|
HRSLF EQU 0xfe8f
|
||||||
|
|
||||||
|
; Called at the beginning of the internal routine of store the current drive, used by the LOF, LOC, EOF, FPOS instructions, etc.
|
||||||
|
HSAVD EQU 0xfe94
|
||||||
|
|
||||||
|
; Called at the beginning of the internal routine LOC, used by the LOC instruction of the Basic.
|
||||||
|
HLOC EQU 0xfe99
|
||||||
|
|
||||||
|
; Called at the beginning of the internal routine LOF, used by the LOF instruction of the Basic.
|
||||||
|
HLOF EQU 0xfe9e
|
||||||
|
|
||||||
|
; Called at the beginning of the internal routine EOF, used by the EOF instruction of the Basic.
|
||||||
|
HEOF EQU 0xfea3
|
||||||
|
|
||||||
|
; Called at the beginning of the internal routine FPOS, used by the FPOS instruction of the Basic
|
||||||
|
HFPOS EQU 0xfea8
|
||||||
|
|
||||||
|
; Called at the beginning of the internal routine BAKUPT.
|
||||||
|
HBAKU EQU 0xfead
|
||||||
|
|
||||||
|
; Called at the beginning of the internal routine PARDEV that parses the device name.
|
||||||
|
HPARD EQU 0xfeb2
|
||||||
|
|
||||||
|
; Called at the beginning of the internal routine NODEVN that is called when no name has been found in the device name table.
|
||||||
|
HNODE EQU 0xfeb7
|
||||||
|
|
||||||
|
; Called at the beginning of the internal routine POSDSK.
|
||||||
|
HPOSD EQU 0xfebc
|
||||||
|
|
||||||
|
; Called at the beginning of the internal routine DEVNAM to process the device name.
|
||||||
|
HDEVN
|
||||||
|
|
||||||
|
; Called at the beginning of the internal routine GENDSP to assign the device name.
|
||||||
|
HGEND EQU 0xfec6
|
||||||
|
|
||||||
|
; Called at the beginning of the routine RUNC, used by the Basic instructions NEW and RUN
|
||||||
|
HRUNC EQU 0xfecb
|
||||||
|
|
||||||
|
; Called at the beginning of the CLEARC routine that initializes the variables table, used by the CLEAR instruction of the Basic.
|
||||||
|
HCLEA EQU 0xfed0
|
||||||
|
|
||||||
|
; Called at the beginning of the internal routine LOPDFT, initialize the variable table, used by the CLEAR instruction of the Basic.
|
||||||
|
HLOPD EQU 0xfed5
|
||||||
|
|
||||||
|
; This hook allows to automatically re-execute the ROM after the disks are installed
|
||||||
|
HSTKE EQU 0xfeda
|
||||||
|
|
||||||
|
; Called at the beginning of the internal routine ISFLIO that tests whether the file to write or read.
|
||||||
|
HISFL EQU 0xfedf
|
||||||
|
|
||||||
|
; Called at the beginning of the Bios routine OUTDO, output a screen character or printer.
|
||||||
|
HOUTD EQU 0xfee4
|
||||||
|
|
||||||
|
; Called at the beginning of the CRDO routine that sends a CR (0Dh) and a LF (code 0Ah).
|
||||||
|
HCRDO EQU 0xfee9
|
||||||
|
|
||||||
|
; Called at the beginning of the internal routine DSKCHI, for the entry of the attribute of a disk.
|
||||||
|
HDSKC EQU 0xfeee
|
||||||
|
|
||||||
|
; Called at the beginning of the internal routine DOGRPH, used by the instructions of the Basic of graphical tracing. (LINE, CIRCLE, ...)
|
||||||
|
HDOGR EQU 0xfef3
|
||||||
|
|
||||||
|
; Called at the end of Basic program execution.
|
||||||
|
HPRGE EQU 0xfef8
|
||||||
|
|
||||||
|
; Called at the beginning of the routine ERRPRT that displays the error message under Basic.
|
||||||
|
HERRP EQU 0xfefd
|
||||||
|
|
||||||
|
; Called at the end of the routine that displays the error message under Basic.
|
||||||
|
HERRF EQU 0xff02
|
||||||
|
|
||||||
|
; Called at the beginning of the routine READY that displays the message "Ok" (or the one defined by the user on MSX2 or newer)
|
||||||
|
HREAD EQU 0xff07
|
||||||
|
|
||||||
|
; Called at the beginning of the MAIN routine, used at each access to the Basic interpreter.
|
||||||
|
HMAIN EQU 0xff0c
|
||||||
|
|
||||||
|
; Called at the beginning of the DIRDO routine which is called when executing instructions in direct mod
|
||||||
|
HDIRD EQU 0xff11
|
||||||
|
|
||||||
|
; Called at the beginning of the routine FININT that initializes the interpretation of a basic instruction.
|
||||||
|
HFINI EQU 0xff16
|
||||||
|
|
||||||
|
; Called at the end of the routine that initializes the interpretation of a basic instruction.
|
||||||
|
HFINE EQU 0xff1b
|
||||||
|
|
||||||
|
; Called at the beginning of the routine CRUNCH that transforms a Basic line into keywords.
|
||||||
|
HCRUN EQU 0xff20
|
||||||
|
|
||||||
|
; Called at the beginning of the CRUSH routine that searches for a keyword in the alphabetical list in Rom.
|
||||||
|
HCRUS EQU 0xff25
|
||||||
|
|
||||||
|
; Called at the beginning of the ISRESV routine when a keyword is found by the CRUSH routine.
|
||||||
|
HISRE EQU 0xff2a
|
||||||
|
|
||||||
|
; Called at the beginning of the NTFN2 routine when a keyword is followed by a line number.
|
||||||
|
HNTFN EQU 0xff2f
|
||||||
|
|
||||||
|
; Called at the beginning of the NOTRSV routine when the sequence of characters examined by the CRUNCH routine is not a keyword.
|
||||||
|
HNOTR EQU 0xff34
|
||||||
|
|
||||||
|
; Called at the beginning of basic instruction FOR.
|
||||||
|
HSNGF EQU 0xff39
|
||||||
|
|
||||||
|
; Called at the end of process of a Basic instruction.
|
||||||
|
HNEWS EQU 0xff3e
|
||||||
|
|
||||||
|
; Called at the beginning of the GONE2 routine, used by the jump instructions (GOTO, THEN, ...)
|
||||||
|
HGONE EQU 0xff43
|
||||||
|
|
||||||
|
; Called at the beginning of the CHRGET routine, enter a character on the keyboard.
|
||||||
|
HCNRG EQU 0xff48
|
||||||
|
|
||||||
|
; Called at the beginning of basic instruction RETURN.
|
||||||
|
HRETU EQU 0xff4d
|
||||||
|
|
||||||
|
; Called at the beginning of basic instruction PRINT.
|
||||||
|
HPRTF EQU 0xff52
|
||||||
|
|
||||||
|
; Called at the beginning of internal routine COMPRT of basic instruction PRINT.
|
||||||
|
HCOMP EQU 0xff57
|
||||||
|
|
||||||
|
; Called at the end of the text display under Basic.
|
||||||
|
HFINP EQU 0xff5c
|
||||||
|
|
||||||
|
; Called When an input error with basic instruction READ/INPUT.
|
||||||
|
HTRMN EQU 0xff61
|
||||||
|
|
||||||
|
; Called at the beginning of expression evaluator routine of Basic interpreter.
|
||||||
|
HFRME EQU 0xff66
|
||||||
|
|
||||||
|
; Called at the beginning of expression evaluator routine of Basic interpreter.
|
||||||
|
HNTPL EQU 0xff6b
|
||||||
|
|
||||||
|
; Called at the beginning of expression evaluator routine of Basic interpreter.
|
||||||
|
HEVAL EQU 0xff70
|
||||||
|
|
||||||
|
; Called at the beginning of transcendental function routine of Basic interpreter.
|
||||||
|
HOKNO EQU 0xff75
|
||||||
|
|
||||||
|
; Called at the beginning of factor evaluator routine of Basic interpreter.
|
||||||
|
HFING EQU 0xff7a
|
||||||
|
|
||||||
|
; Called at the beginning of basic instruction MID$.
|
||||||
|
HISMI EQU 0xff7f
|
||||||
|
|
||||||
|
; Called at the beginning of basic instruction WIDTH.
|
||||||
|
HWIDT EQU 0xff84
|
||||||
|
|
||||||
|
; Called at the beginning of basic instruction LIST/LLIST.
|
||||||
|
HLIST EQU 0xff89
|
||||||
|
|
||||||
|
; Called when instructions LIST detokenise a basic instruction.
|
||||||
|
HBUFL EQU 0xff8e
|
||||||
|
|
||||||
|
; Called at the beginning of frequency interrupt routine
|
||||||
|
HFRQINT EQU 0xff93
|
||||||
|
|
||||||
|
; Called at the beginning of the routine SCNEX2 from Basic interpretor, conversion of a line number to a memory address and vice versa.
|
||||||
|
HSCNE EQU 0xff98
|
||||||
|
|
||||||
|
; Called at the beginning of the routine FRETMP from Basic interpretor, search for a free location to store the descriptor an alphanumeric variable.
|
||||||
|
HFRET EQU 0xff9d
|
||||||
|
|
||||||
|
; Called at the beginning of the routine PTRGET from Basic interpretor, to get the pointer to found a variable.
|
||||||
|
HPTRG EQU 0xffa2
|
||||||
|
|
||||||
|
; Called at the beginning of the routine PHYDIO (Main-ROM at 0144h).
|
||||||
|
HPHYD EQU 0xffa7
|
||||||
|
|
||||||
|
; Called at the beginning of the routine FORMAT (Main-ROM at 0147h).
|
||||||
|
HFORM EQU 0xffac
|
||||||
|
|
||||||
|
; Called at the beginning of the error handler routine of Basic.
|
||||||
|
HERRO EQU 0xffb1
|
||||||
|
|
||||||
|
; Called at the beginning of the routine LPTOUT (Main-ROM at 00A5h).
|
||||||
|
HLPTO EQU 0xffb6
|
||||||
|
|
||||||
|
; Called at the beginning of the routine LPTSTT (Main-ROM at 00A5h).
|
||||||
|
HLPTS EQU 0xffbb
|
||||||
|
|
||||||
|
; Called at the beginning of the instruction SCREEN of Basic.
|
||||||
|
HSCRE EQU 0xffc0
|
||||||
|
|
||||||
|
; Called at the beginning of the instruction PLAY of Basic.
|
||||||
|
HPLAY EQU 0xffc5
|
||||||
|
|
||||||
|
SIZE EQU HPLAY + 4 - HKEYI
|
||||||
|
|
||||||
|
ENDMODULE
|
||||||
Vendored
-32
@@ -1,32 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "2.0.0",
|
|
||||||
"tasks": [
|
|
||||||
{
|
|
||||||
"label": "make MB_v5.21 (sjasmplus)",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "sjasmplus",
|
|
||||||
"args": [
|
|
||||||
"--fullpath",
|
|
||||||
"--nofakes",
|
|
||||||
"--i8080",
|
|
||||||
"--sld=mb.sld",
|
|
||||||
"mb.asm"
|
|
||||||
],
|
|
||||||
"problemMatcher": {
|
|
||||||
"owner": "sjasmplus",
|
|
||||||
"fileLocation": "autoDetect",
|
|
||||||
"pattern": {
|
|
||||||
"regexp": "^(.*)\\((\\d+)\\):\\s+(warning|error):\\s+(.*)$",
|
|
||||||
"file": 1,
|
|
||||||
"line": 2,
|
|
||||||
"severity": 3,
|
|
||||||
"message": 4
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"group": {
|
|
||||||
"kind": "build",
|
|
||||||
"isDefault": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
+18
-8
@@ -41,12 +41,14 @@ MB_STMDSP:
|
|||||||
DW MB_FNOUT
|
DW MB_FNOUT
|
||||||
DW MB_LPRINT
|
DW MB_LPRINT
|
||||||
DW MB_LLIST
|
DW MB_LLIST
|
||||||
DW 0
|
DW 0x0000
|
||||||
DW MB_WIDTH
|
DW MB_WIDTH
|
||||||
DW MB_REM
|
DW MB_REM
|
||||||
|
|
||||||
DW MB_TON
|
DW MB_TON
|
||||||
DW MB_TOFF
|
DW MB_TOFF
|
||||||
DW MB_SWAP
|
DW MB_SWAP
|
||||||
|
|
||||||
DW MB_ERASE
|
DW MB_ERASE
|
||||||
DW MB_EDIT
|
DW MB_EDIT
|
||||||
DW MB_ERRORS
|
DW MB_ERRORS
|
||||||
@@ -59,8 +61,8 @@ MB_STMDSP:
|
|||||||
DW MB_DEFREA
|
DW MB_DEFREA
|
||||||
DW MB_DEFDBL
|
DW MB_DEFDBL
|
||||||
DW MB_LINE
|
DW MB_LINE
|
||||||
DW 0
|
DW 0x0000
|
||||||
DW 0
|
DW 0x0000
|
||||||
DW MB_WHILE
|
DW MB_WHILE
|
||||||
DW MB_WEND
|
DW MB_WEND
|
||||||
DW MB_CALLS
|
DW MB_CALLS
|
||||||
@@ -69,9 +71,9 @@ MB_STMDSP:
|
|||||||
DW MB_CHAIN
|
DW MB_CHAIN
|
||||||
DW MB_OPTION
|
DW MB_OPTION
|
||||||
DW MB_RANDOM
|
DW MB_RANDOM
|
||||||
DW 0
|
DW 0x0000
|
||||||
DW MB_SYSTEM
|
DW MB_SYSTEM
|
||||||
DW 0
|
DW 0x0000
|
||||||
DW MB_OPEN
|
DW MB_OPEN
|
||||||
DW MB_FIELD
|
DW MB_FIELD
|
||||||
DW MB_GET
|
DW MB_GET
|
||||||
@@ -128,18 +130,26 @@ MB_FUNDSP:
|
|||||||
DW MB_FRCDBL
|
DW MB_FRCDBL
|
||||||
DW MB_FIXER
|
DW MB_FIXER
|
||||||
|
|
||||||
DS 22, 0
|
DS 22, 0
|
||||||
|
|
||||||
; ---------------------------------------------------
|
; ---------------------------------------------------
|
||||||
; DISK FUNCTIONS
|
; Conversion functions
|
||||||
; ---------------------------------------------------
|
; ---------------------------------------------------
|
||||||
DW MB_CVI
|
DW MB_CVI
|
||||||
DW MB_CVS
|
DW MB_CVS
|
||||||
DW MB_CVD
|
DW MB_CVD
|
||||||
DW WARM_BOOT
|
DW 0x0000
|
||||||
|
|
||||||
|
; ---------------------------------------------------
|
||||||
|
; Disk functions
|
||||||
|
; ---------------------------------------------------
|
||||||
DW MB_EOF
|
DW MB_EOF
|
||||||
DW MB_LOC
|
DW MB_LOC
|
||||||
DW MB_LOF
|
DW MB_LOF
|
||||||
|
|
||||||
|
; ---------------------------------------------------
|
||||||
|
; Conversion functions
|
||||||
|
; ---------------------------------------------------
|
||||||
DW MB_MKI_
|
DW MB_MKI_
|
||||||
DW MB_MKS_
|
DW MB_MKS_
|
||||||
DW MB_MKD_
|
DW MB_MKD_
|
||||||
|
|||||||
+73
-82
@@ -67,6 +67,7 @@ _DEFSNG EQU 175 ; 0xAF
|
|||||||
_DEFDBL EQU 176 ; 0xB0
|
_DEFDBL EQU 176 ; 0xB0
|
||||||
_LINE EQU 177 ; 0xB1
|
_LINE EQU 177 ; 0xB1
|
||||||
_WHILE EQU 180 ; 0xB4
|
_WHILE EQU 180 ; 0xB4
|
||||||
|
_BEEP EQU 180 ; 0xB4 ToDo: doublecheck!
|
||||||
_WEND EQU 181 ; 0xB5
|
_WEND EQU 181 ; 0xB5
|
||||||
_CALL EQU 182 ; 0xB6
|
_CALL EQU 182 ; 0xB6
|
||||||
_WRITE EQU 183 ; 0xB7
|
_WRITE EQU 183 ; 0xB7
|
||||||
@@ -101,6 +102,8 @@ NUMCMD EQU _RESET - _END + 1 ; 76
|
|||||||
; ---------------------------------------------------
|
; ---------------------------------------------------
|
||||||
|
|
||||||
_TO EQU 206 ; 0xCE
|
_TO EQU 206 ; 0xCE
|
||||||
|
_COLOR EQU 206 ; 0xCE ToDo: Double check!
|
||||||
|
|
||||||
TOTK EQU 206
|
TOTK EQU 206
|
||||||
|
|
||||||
_THEN EQU 207 ; 0xCF
|
_THEN EQU 207 ; 0xCF
|
||||||
@@ -160,19 +163,21 @@ _VARPTR EQU 220 ; 0xDC
|
|||||||
|
|
||||||
_INKEY EQU 221 ; 0xDD
|
_INKEY EQU 221 ; 0xDD
|
||||||
|
|
||||||
; ---------------------------------------------------
|
; ; ---------------------------------------------------
|
||||||
; Extended OK-240 operators
|
; ; Extended OK-240 operators
|
||||||
; ---------------------------------------------------
|
; ; ---------------------------------------------------
|
||||||
EXT_OP_FIRST EQU 224
|
; EXT_OP_FIRST EQU 224
|
||||||
_CLS EQU 224 ; 0xE0
|
; _CLS EQU 224 ; 0xE0
|
||||||
_SCRN EQU 225 ; 0xE1
|
; _SCRN EQU 225 ; 0xE1
|
||||||
_COLOR EQU 226 ; 0xE2
|
; _COLOR EQU 226 ; 0xE2
|
||||||
_CURS EQU 227 ; 0xE3
|
; _CURS EQU 227 ; 0xE3
|
||||||
_PLOT EQU 228 ; 0xE4
|
; _PLOT EQU 228 ; 0xE4
|
||||||
_RECT EQU 229 ; 0xE5
|
; _RECT EQU 229 ; 0xE5
|
||||||
_GPRINT EQU 230 ; 0xE6
|
; _GPRINT EQU 230 ; 0xE6
|
||||||
_TONE EQU 231 ; 0xE7
|
; _TONE EQU 231 ; 0xE7
|
||||||
EXT_OP_LAST EQU 231
|
;EXT_OP_LAST EQU 231
|
||||||
|
|
||||||
|
_ATTR_ EQU 227 ; 0xE3
|
||||||
|
|
||||||
|
|
||||||
; ---------------------------------------------------
|
; ---------------------------------------------------
|
||||||
@@ -330,34 +335,43 @@ MD.RND EQU 3 ; random
|
|||||||
N1 EQU 11 ; Number of bytes to use from ATNCON
|
N1 EQU 11 ; Number of bytes to use from ATNCON
|
||||||
N2 EQU 13 ; Number of bytes to use from SINCON
|
N2 EQU 13 ; Number of bytes to use from SINCON
|
||||||
|
|
||||||
OCTCON EQU 11 ; EMBEDED OCTAL CONSTANT
|
; --------------------------------------------------
|
||||||
HEXCON EQU 12 ; EMBEDED CONSTANT
|
; Base tokens
|
||||||
PTRCON EQU 13 ; A LINE REFERENCE CONSTANT
|
; --------------------------------------------------
|
||||||
LINCON EQU 14 ; A LINE NUMBER UNCONVERTED TO POINTER
|
OCTCON EQU 0x0B ; 11 embeded Octal constant
|
||||||
IN2CON EQU 15 ; SINGLE BYTE (TWO BYTE WITH TOKEN) INTEGER
|
HEXCON EQU 0x0C ; 12 embeded Hex constant
|
||||||
CONCN2 EQU 16 ; TOKEN RETURNED SECOND TYPE CONSTANT IS SCANNED.
|
PTRCON EQU 0x0D ; 13 line pointer constant
|
||||||
ONECON EQU 17 ; FIRST OF 10 (0-9) INTEGER SPECIAL TOKENS
|
LINCON EQU 0x0E ; 14 line number
|
||||||
INTCON EQU 28 ; REGULAR 16 BIT TWO'S COMPLEMENT INT
|
IN2CON EQU 0x0F ; 15 Single byte integer (two byte with token) 11..255
|
||||||
SNGCON EQU 29 ; SINGLE PREC (4 BYTE) CONSTANT
|
|
||||||
CONCON EQU 30 ; TOKEN RETURNED BY CHRGET AFTER CONSTANT SCANNED
|
CONCN2 EQU 0x10 ; 16 Internal token, returned second type constant is scaned
|
||||||
DBLCON EQU 31 ; DOUBLE PREC (8 BYTE) CONSTANT
|
|
||||||
|
ONECON EQU 0x11 ; 17 First of 10 special tokens for Int (0x11 - 1, 0x12 - 2 ... 0x1B - 10)
|
||||||
|
INTCON EQU 0x1C ; 28 2-byte Int
|
||||||
|
SNGCON EQU 0x1D ; 29 4-byte single precision real EEDDDDDD
|
||||||
|
CONCON EQU 0x1E ; 30 Internal token, returned by CHARGET after constant scanned
|
||||||
|
DBLCON EQU 0x1F ; 31 8-byte double precision real EEDDDDDDDDDDDDDD
|
||||||
|
|
||||||
|
|
||||||
; --------------------------------------------------
|
; --------------------------------------------------
|
||||||
; ASCII codes
|
; ASCII codes
|
||||||
; --------------------------------------------------
|
; --------------------------------------------------
|
||||||
|
|
||||||
|
ASCII_NUL EQU 0x00 ; NUL (null)
|
||||||
|
ASCII_EOT EQU 0x04 ; EOT (End of transmission)
|
||||||
ASCII_BELL EQU 0x07 ; 7
|
ASCII_BELL EQU 0x07 ; 7
|
||||||
ASCII_BKSP EQU 0x08 ; 8
|
ASCII_BS EQU 0x08 ; 8
|
||||||
ASCII_TAB EQU 0x09 ; 9
|
ASCII_TAB EQU 0x09 ; HT (Horizontal tab)
|
||||||
ASCII_LF EQU 0x0a ; 10
|
ASCII_LF EQU 0x0A ; 10 - LF (Line feed)
|
||||||
ASCII_CR EQU 0x0d ; 13
|
ASCII_CR EQU 0x0D ; 13 - CR (Carriage return)
|
||||||
ASCII_DEL EQU 0x7f ; 127
|
ASCII_SYN EQU 0x16 ; SYN (Synchronous idle)
|
||||||
ASCII_ESC EQU 0x1b ;
|
ASCII_SUB EQU 0x1A ; SUB (Substitute), EOF - (End of file)
|
||||||
|
ASCII_ESC EQU 0x1B ; 27 - ESC (Escape)
|
||||||
ASCII_SP EQU 0x20 ; space
|
ASCII_SP EQU 0x20 ; space
|
||||||
ASCII_CUR EQU 0x24 ; $
|
ASCII_CUR EQU 0x24 ; $
|
||||||
ASCII_SQ EQU 0x27 ; '
|
ASCII_SQ EQU 0x27 ; '
|
||||||
ASCII_BKSL EQU 0x5C ; \
|
ASCII_BKSL EQU 0x5C ; \
|
||||||
|
ASCII_DEL EQU 0x7F ; DEL (Delete)
|
||||||
|
|
||||||
; --------------------------------------------------
|
; --------------------------------------------------
|
||||||
; Key codes
|
; Key codes
|
||||||
@@ -368,7 +382,7 @@ CTRL_O EQU 0x0f ; 15
|
|||||||
CTRL_R EQU 0x12 ; 18
|
CTRL_R EQU 0x12 ; 18
|
||||||
CTRL_U EQU 0x15 ; 21
|
CTRL_U EQU 0x15 ; 21
|
||||||
CTRL_X EQU 0x18 ; 24
|
CTRL_X EQU 0x18 ; 24
|
||||||
|
CTRL_Z EQU 0x1A
|
||||||
|
|
||||||
CLMWID EQU 0x0e ; 14
|
CLMWID EQU 0x0e ; 14
|
||||||
CON1 EQU 0x2c20 ; ' ',
|
CON1 EQU 0x2c20 ; ' ',
|
||||||
@@ -392,56 +406,6 @@ DBLK.C EQU DBLKSZ ; SIZE OF A FILE INFO BLOCK
|
|||||||
|
|
||||||
EOFCHR EQU 0x1a ; 26
|
EOFCHR EQU 0x1a ; 26
|
||||||
|
|
||||||
; --------------------------------------------------
|
|
||||||
; Error codes
|
|
||||||
; --------------------------------------------------
|
|
||||||
ERRNF EQU 0x01
|
|
||||||
ERRSN EQU 0x02 ; 2
|
|
||||||
ERRRG EQU 0x03 ; 3
|
|
||||||
ERROD EQU 0x04 ; 4
|
|
||||||
ERRFC EQU 0x05 ; 5
|
|
||||||
ERROV EQU 0x06 ; 6
|
|
||||||
ERROM EQU 0x07
|
|
||||||
ERRUS EQU 0x08 ; 8
|
|
||||||
ERRBS EQU 0x09 ; 9
|
|
||||||
ERRDD EQU 0x0a ; 10
|
|
||||||
ERRDV0 EQU 0x0b ; 11
|
|
||||||
ERRID EQU 0x0c ; 12
|
|
||||||
ERRTM EQU 0x0d ; 13
|
|
||||||
ERRSO EQU 0x0e ; Out of space
|
|
||||||
ERRLS EQU 0x0f ; 15
|
|
||||||
ERRST EQU 0x10 ; String formula too complex
|
|
||||||
ERRCN EQU 0x11 ; 17
|
|
||||||
ERRUF EQU 0x12 ; Undefined user function
|
|
||||||
ERRNR EQU 0x13 ; 19
|
|
||||||
ERRRE EQU 0x14 ; 20
|
|
||||||
ERRUE EQU 0x15 ; Unprintable error
|
|
||||||
ERRMO EQU 0x16 ; Missing operand
|
|
||||||
ERRLBO EQU 0x17 ; 23
|
|
||||||
; skipped 18 and 19
|
|
||||||
ERRFN EQU 0x1a ; 26
|
|
||||||
; skipped 1b and 1c
|
|
||||||
ERRWH EQU 0x1d ; 29
|
|
||||||
ERRWE EQU 0x1e ; 30
|
|
||||||
|
|
||||||
NONDSK EQU 0x1e ; Last non disk error
|
|
||||||
|
|
||||||
; disk errors starts from here
|
|
||||||
DSKERR EQU 0x31 ; 49
|
|
||||||
;
|
|
||||||
ERRFOV EQU 0x32 ; 50
|
|
||||||
ERRIER EQU 0x33 ; 51
|
|
||||||
ERRBFN EQU 0x34 ; 52
|
|
||||||
ERRFNF EQU 0x35 ; 53
|
|
||||||
ERRBFM EQU 0x36 ; 54
|
|
||||||
ERRFAO EQU 0x37 ; 55
|
|
||||||
ERRIOE EQU 0x39 ; 57
|
|
||||||
ERRFAE EQU 0x3a ; 58
|
|
||||||
ERRDFL EQU 0x3d ; 61
|
|
||||||
ERRRPE EQU 0x3e ; 62
|
|
||||||
ERRFDR EQU 0x42 ; 66
|
|
||||||
ERRTMF EQU 0x43 ; 67
|
|
||||||
; --------------------------------------------------
|
|
||||||
|
|
||||||
FD.SIZ EQU 0xa9 ; 169
|
FD.SIZ EQU 0xa9 ; 169
|
||||||
FD.PHY EQU 0xab ; 171
|
FD.PHY EQU 0xab ; 171
|
||||||
@@ -467,4 +431,31 @@ NMREL EQU 0x03 ; 3
|
|||||||
PRMSIZ EQU 0x64 ; 100
|
PRMSIZ EQU 0x64 ; 100
|
||||||
SQO EQU 0x02 ; 2
|
SQO EQU 0x02 ; 2
|
||||||
SWTCHR EQU 0x2f ; 47
|
SWTCHR EQU 0x2f ; 47
|
||||||
WHLSIZ EQU 0x06 ; 6
|
WHLSIZ EQU 0x06 ; 6
|
||||||
|
|
||||||
|
; --------------------------------------------------
|
||||||
|
; Types
|
||||||
|
; --------------------------------------------------
|
||||||
|
TINT EQU 0x02 ; 2 2-byte Integer
|
||||||
|
TSTR EQU 0x03 ; 3 <B_len>+<W-prt> String
|
||||||
|
TSGN EQU 0x04 ; 4 4-byte single precision real
|
||||||
|
TDBL EQU 0x08 ; 8 8-byte single precision real
|
||||||
|
|
||||||
|
|
||||||
|
; --------------------------------------------------
|
||||||
|
; Constants to skip next Ops
|
||||||
|
; --------------------------------------------------
|
||||||
|
LD_A_n EQU 0x3E ; skip next 1-byte op A = !0
|
||||||
|
LD_L_n EQU 0x2E ; skip next 1-byte op L = !0
|
||||||
|
LD_B_n EQU 0x06 ; skip next 1-byte op B = !0
|
||||||
|
LD_D_n EQU 0x16 ; skip next 1-byte op D = !0
|
||||||
|
;LD_C_n EQU 0x0E ; skip next 1-byte op
|
||||||
|
LD_BC_nn EQU 0x01 ; skip next 2-byte op
|
||||||
|
LD_DE_nn EQU 0x11 ; skip next 2-byte op
|
||||||
|
JP_NZ_nn EQU 0xC2 ;
|
||||||
|
JP_Z_nn EQU 0xCA
|
||||||
|
JP_NC_nn EQU 0xD2
|
||||||
|
JP_C_nn EQU 0xDA
|
||||||
|
JP_M_nn EQU 0xFA
|
||||||
|
OR_n EQU 0xF6 ; skip next byte op, set flags
|
||||||
|
CP_n EQU 0xFE ; skip next byte op, set flags
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
; =============================================================================
|
||||||
|
; Source codes for Microsoft Basic-80 v5.21 for CP/M
|
||||||
|
;
|
||||||
|
; Error messages and their codes
|
||||||
|
;
|
||||||
|
; Disassembled by Romych and Ghidra @2026.08.27
|
||||||
|
; =============================================================================
|
||||||
|
|
||||||
|
; ---------------------------------------------------
|
||||||
|
; Messages
|
||||||
|
; ---------------------------------------------------
|
||||||
|
MB_ERROR_MSGS:
|
||||||
|
DB "NEXT without FOR", 0
|
||||||
|
DB "Syntax error", 0
|
||||||
|
DB "RETURN without GOSUB", 0
|
||||||
|
DB "Out of DATA", 0
|
||||||
|
DB "Illegal function call", 0
|
||||||
|
|
||||||
|
; ---------------------------------------------------
|
||||||
|
MB_OVRMSG:
|
||||||
|
DB "Overflow", 0
|
||||||
|
DB "Out of memory", 0
|
||||||
|
DB "Undefined line number", 0
|
||||||
|
DB "Subscript out of range", 0
|
||||||
|
DB "Duplicate Definition", 0
|
||||||
|
|
||||||
|
; ---------------------------------------------------
|
||||||
|
MB_DBZ_MSG:
|
||||||
|
DB "Division by zero", 0
|
||||||
|
DB "Illegal direct", 0
|
||||||
|
DB "Type mismatch", 0
|
||||||
|
DB "Out of string space", 0
|
||||||
|
DB "String too long", 0
|
||||||
|
DB "String formula too complex", 0
|
||||||
|
DB "Can't continue", 0
|
||||||
|
DB "Undefined user function", 0
|
||||||
|
DB "No RESUME\0RESUME without error", 0
|
||||||
|
DB "Unprintable error", 0
|
||||||
|
DB "Missing operand", 0
|
||||||
|
DB "Line buffer overflow", 0
|
||||||
|
DB '?', 0
|
||||||
|
DB '?', 0
|
||||||
|
DB "FOR Without NEXT", 0
|
||||||
|
DB '?', 0
|
||||||
|
DB '?', 0
|
||||||
|
DB "WHILE without WEND", 0
|
||||||
|
DB "WEND without WHILE", 0
|
||||||
|
|
||||||
|
DB "FIELD overflow", 0
|
||||||
|
DB "Internal error", 0
|
||||||
|
DB "Bad file number", 0
|
||||||
|
DB "File not found", 0
|
||||||
|
DB "Bad file mode", 0
|
||||||
|
DB "File already open", 0
|
||||||
|
DB '?', 0
|
||||||
|
DB "Disk I/O error", 0
|
||||||
|
DB "File already exists", 0
|
||||||
|
DB '?', 0
|
||||||
|
DB '?', 0
|
||||||
|
DB "Disk full", 0
|
||||||
|
DB "Input past end", 0
|
||||||
|
DB "Bad record number", 0
|
||||||
|
DB "Bad file name", 0
|
||||||
|
DB '?', 0
|
||||||
|
DB "Direct statement in file", 0
|
||||||
|
DB "Too many files", 0
|
||||||
|
|
||||||
|
; --------------------------------------------------
|
||||||
|
; Error codes
|
||||||
|
; --------------------------------------------------
|
||||||
|
ERRNF EQU 0x01
|
||||||
|
ERRSN EQU 0x02 ; 2
|
||||||
|
ERRRG EQU 0x03 ; 3
|
||||||
|
ERROD EQU 0x04 ; 4
|
||||||
|
ERRFC EQU 0x05 ; 5
|
||||||
|
ERROV EQU 0x06 ; 6
|
||||||
|
ERROM EQU 0x07
|
||||||
|
ERRULN EQU 0x08 ; 8
|
||||||
|
ERRBS EQU 0x09 ; 9
|
||||||
|
ERRDD EQU 0x0a ; 10
|
||||||
|
ERRDV0 EQU 0x0b ; 11
|
||||||
|
ERRID EQU 0x0c ; 12
|
||||||
|
ERRTM EQU 0x0d ; 13
|
||||||
|
ERRSO EQU 0x0e ; Out of space
|
||||||
|
ERRLS EQU 0x0f ; 15
|
||||||
|
ERRST EQU 0x10 ; String formula too complex
|
||||||
|
ERRCN EQU 0x11 ; 17
|
||||||
|
ERRUF EQU 0x12 ; Undefined user function
|
||||||
|
ERRNR EQU 0x13 ; 19
|
||||||
|
ERRRE EQU 0x14 ; 20
|
||||||
|
ERRUE EQU 0x15 ; Unprintable error
|
||||||
|
ERRMO EQU 0x16 ; Missing operand
|
||||||
|
ERRLBO EQU 0x17 ; 23
|
||||||
|
; skipped 18 and 19
|
||||||
|
ERRFN EQU 0x1a ; 26
|
||||||
|
; skipped 1b and 1c
|
||||||
|
ERRWH EQU 0x1d ; 29
|
||||||
|
ERRWE EQU 0x1e ; 30
|
||||||
|
|
||||||
|
NONDSK EQU 0x1e ; Last non disk error
|
||||||
|
|
||||||
|
; disk errors starts from here
|
||||||
|
DSKERR EQU 0x31 ; 49
|
||||||
|
;
|
||||||
|
ERRFOV EQU 0x32 ; 50
|
||||||
|
ERRIER EQU 0x33 ; 51
|
||||||
|
ERRBFN EQU 0x34 ; 52
|
||||||
|
ERRFNF EQU 0x35 ; 53
|
||||||
|
ERRBFM EQU 0x36 ; 54
|
||||||
|
ERRFAO EQU 0x37 ; 55
|
||||||
|
ERRIOE EQU 0x39 ; 57
|
||||||
|
ERRFAE EQU 0x3a ; 58
|
||||||
|
ERRDFL EQU 0x3d ; 61
|
||||||
|
ERRRPE EQU 0x3e ; 62
|
||||||
|
ERRFDR EQU 0x42 ; 66
|
||||||
|
ERRTMF EQU 0x43 ; 67
|
||||||
|
; --------------------------------------------------
|
||||||
+21
-86
@@ -11,18 +11,18 @@
|
|||||||
; OPERATOR PRECEDENCE TABLE
|
; OPERATOR PRECEDENCE TABLE
|
||||||
; --------------------------------------------------
|
; --------------------------------------------------
|
||||||
MB_OPTAB:
|
MB_OPTAB:
|
||||||
DB 121
|
DB 121 ; +
|
||||||
DB 121
|
DB 121 ; -
|
||||||
DB 124
|
DB 124 ; *
|
||||||
DB 124
|
DB 124 ; /
|
||||||
DB 127
|
DB 127 ; ^
|
||||||
DB 80
|
DB 80 ; OR
|
||||||
DB 70
|
DB 70 ; AND
|
||||||
DB 60 ; PRECEDENCE OF "XOR"
|
DB 60 ; XOR
|
||||||
DB 50 ; PRECEDENCE OF "EQV"
|
DB 50 ; EQV
|
||||||
DB 40 ; PRECEDENCE OF "IMP"
|
DB 40 ; IMP
|
||||||
DB 122 ; PRECEDENCE OF "MOD"
|
DB 122 ; MOD
|
||||||
DB 123 ; PRECEDENCE OF "IDIV"
|
DB 123 ; IDIV
|
||||||
|
|
||||||
; --------------------------------------------------
|
; --------------------------------------------------
|
||||||
; USED BY ASSIGNMENT CODE TO FORCE THE RIGHT HAND VALUE
|
; USED BY ASSIGNMENT CODE TO FORCE THE RIGHT HAND VALUE
|
||||||
@@ -70,63 +70,7 @@ MB_INTDSP:
|
|||||||
MB_ERRTAB:
|
MB_ERRTAB:
|
||||||
DB 0
|
DB 0
|
||||||
|
|
||||||
; ---------------------------------------------------
|
include "errors.inc"
|
||||||
MB_ERROR_MSGS:
|
|
||||||
DB "NEXT without FOR", 0
|
|
||||||
DB "Syntax error", 0
|
|
||||||
DB "RETURN without GOSUB", 0
|
|
||||||
DB "Out of DATA", 0
|
|
||||||
DB "Illegal function call", 0
|
|
||||||
|
|
||||||
; ---------------------------------------------------
|
|
||||||
MB_OVRMSG:
|
|
||||||
DB "Overflow", 0
|
|
||||||
DB "Out of memory", 0
|
|
||||||
DB "Undefined line number", 0
|
|
||||||
DB "Subscript out of range", 0
|
|
||||||
DB "Duplicate Definition", 0
|
|
||||||
|
|
||||||
; ---------------------------------------------------
|
|
||||||
MB_DBZ_MSG:
|
|
||||||
DB "Division by zero", 0
|
|
||||||
DB "Illegal direct", 0
|
|
||||||
DB "Type mismatch", 0
|
|
||||||
DB "Out of string space", 0
|
|
||||||
DB "String too long", 0
|
|
||||||
DB "String formula too complex", 0
|
|
||||||
DB "Can't continue", 0
|
|
||||||
DB "Undefined user function", 0
|
|
||||||
DB "No RESUME\0RESUME without error", 0
|
|
||||||
DB "Unprintable error", 0
|
|
||||||
DB "Missing operand", 0
|
|
||||||
DB "Line buffer overflow", 0
|
|
||||||
DB '?', 0
|
|
||||||
DB '?', 0
|
|
||||||
DB "FOR Without NEXT", 0
|
|
||||||
DB '?', 0
|
|
||||||
DB '?', 0
|
|
||||||
DB "WHILE without WEND", 0
|
|
||||||
DB "WEND without WHILE", 0
|
|
||||||
|
|
||||||
DB "FIELD overflow", 0
|
|
||||||
DB "Internal error", 0
|
|
||||||
DB "Bad file number", 0
|
|
||||||
DB "File not found", 0
|
|
||||||
DB "Bad file mode", 0
|
|
||||||
DB "File already open", 0
|
|
||||||
DB '?', 0
|
|
||||||
DB "Disk I/O error", 0
|
|
||||||
DB "File already exists", 0
|
|
||||||
DB '?', 0
|
|
||||||
DB '?', 0
|
|
||||||
DB "Disk full", 0
|
|
||||||
DB "Input past end", 0
|
|
||||||
DB "Bad record number", 0
|
|
||||||
DB "Bad file name", 0
|
|
||||||
DB '?', 0
|
|
||||||
DB "Direct statement in file", 0
|
|
||||||
DB "Too many files", 0
|
|
||||||
|
|
||||||
|
|
||||||
; ---------------------------------------------------
|
; ---------------------------------------------------
|
||||||
MB_USRTAB:
|
MB_USRTAB:
|
||||||
@@ -207,11 +151,7 @@ MB_NAMCNT:
|
|||||||
DB 0
|
DB 0
|
||||||
|
|
||||||
MB_NAMBUF:
|
MB_NAMBUF:
|
||||||
DB 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
.38 DB 0x00
|
||||||
DB 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
|
||||||
DB 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
|
||||||
DB 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
|
||||||
DB 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
|
||||||
|
|
||||||
; TEMP STORAGE DURING NAME SAVE AT INDLOP
|
; TEMP STORAGE DURING NAME SAVE AT INDLOP
|
||||||
MB_NAMTMP:
|
MB_NAMTMP:
|
||||||
@@ -221,12 +161,7 @@ MB_FILNA2:
|
|||||||
.16 DB 0x00
|
.16 DB 0x00
|
||||||
|
|
||||||
MB_FILNAM:
|
MB_FILNAM:
|
||||||
DB 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
.33 DB 0x00
|
||||||
DB 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
|
||||||
DB 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
|
||||||
DB 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
|
||||||
DB 0x00
|
|
||||||
|
|
||||||
|
|
||||||
MB_CPMVRN:
|
MB_CPMVRN:
|
||||||
DB 0 ; CP/M Version Number (#0 is 2.x)
|
DB 0 ; CP/M Version Number (#0 is 2.x)
|
||||||
@@ -451,20 +386,20 @@ MB_TRCFLG:
|
|||||||
|
|
||||||
|
|
||||||
MB_FLOAT_ACC:
|
MB_FLOAT_ACC:
|
||||||
DB 0 ; FLOATING ACCUMULATOR
|
DB 0 ; FLOATING ACCUMULATOR
|
||||||
|
|
||||||
MB_DFACLO:
|
MB_DFACLO:
|
||||||
DB 0, 0, 0, 0 ; FOUR LOWEST ORDERS FOR DOUBLE PRECISION
|
DB 0, 0, 0, 0 ; FOUR LOWEST ORDERS FOR DOUBLE PRECISION
|
||||||
|
|
||||||
MB_FACLO:
|
MB_FACLO:
|
||||||
DB 0, 0 ; MIDDLE ORDER OF MANTISSA
|
DB 0, 0 ; MIDDLE ORDER OF MANTISSA
|
||||||
DB 0 ; HIGH ORDER OF MANTISSA
|
DB 0 ; HIGH ORDER OF MANTISSA
|
||||||
|
|
||||||
MB_FAC:
|
MB_FAC:
|
||||||
DB 0, 0 ; EXPONENT
|
DB 0, 0 ; EXPONENT
|
||||||
|
|
||||||
MB_FLGOVC:
|
MB_FLGOVC:
|
||||||
DB 0 ; OVERFLOW PRINT FLAG, =0, 1 PRINT
|
DB 0 ; OVERFLOW PRINT FLAG, =0, 1 PRINT
|
||||||
|
|
||||||
MB_OVCSTR:
|
MB_OVCSTR:
|
||||||
DB 0
|
DB 0
|
||||||
|
|||||||
+754
-226
File diff suppressed because it is too large.
Load diff
+3
-3
@@ -129,8 +129,8 @@ MB_LTAB:
|
|||||||
|
|
||||||
; ---------------------------------------------------
|
; ---------------------------------------------------
|
||||||
MB_MTAB:
|
MB_MTAB:
|
||||||
DB "ERG", 'E' OR 0x80, 0xC5
|
DB "ERG", 'E' OR 0x80, _MERGE
|
||||||
DB 'O', 'D' OR 0x80, 0xFC
|
DB 'O', 'D' OR 0x80, _MOD
|
||||||
DB "KI", '$' OR 0x80, _MKI_ - 0x80
|
DB "KI", '$' OR 0x80, _MKI_ - 0x80
|
||||||
DB "KS", '$' OR 0x80, _MKS_ - 0x80
|
DB "KS", '$' OR 0x80, _MKS_ - 0x80
|
||||||
DB "KD", '$' OR 0x80, _MKD_ - 0x80
|
DB "KD", '$' OR 0x80, _MKD_ - 0x80
|
||||||
@@ -246,7 +246,7 @@ MB_ZTAB:
|
|||||||
DB 0
|
DB 0
|
||||||
|
|
||||||
; ---------------------------------------------------
|
; ---------------------------------------------------
|
||||||
;
|
; Special character table
|
||||||
; ---------------------------------------------------
|
; ---------------------------------------------------
|
||||||
MB_SPCTAB:
|
MB_SPCTAB:
|
||||||
DB '+' OR 0x80
|
DB '+' OR 0x80
|
||||||
|
|||||||
@@ -0,0 +1,188 @@
|
|||||||
|
; ---------------------------------------------------
|
||||||
|
_LEFT_ EQU 0x81 ; 129
|
||||||
|
_RIGHT_ EQU 0x82 ; 130
|
||||||
|
_MID_ EQU 0x83 ; 131
|
||||||
|
_SGN EQU 0x84 ; 132
|
||||||
|
_INT EQU 0x85 ; 133
|
||||||
|
_ABS EQU 0x86 ; 134
|
||||||
|
_SQR EQU 0x87 ; 135
|
||||||
|
_RND EQU 0x88 ; 136
|
||||||
|
_SIN EQU 0x89 ; 137
|
||||||
|
_LOG EQU 0x8a ; 138
|
||||||
|
_EXP EQU 0x8b ; 139
|
||||||
|
_COS EQU 0x8c ; 140
|
||||||
|
_TAN EQU 0x8d ; 141
|
||||||
|
_ATN EQU 0x8e ; 142
|
||||||
|
_FRE EQU 0x8f ; 143
|
||||||
|
; ---------------------------------------------------
|
||||||
|
_INP EQU 0x90 ; 144
|
||||||
|
_POS EQU 0x91 ; 145
|
||||||
|
_LEN EQU 0x92 ; 146
|
||||||
|
_STR_ EQU 0x93 ; 147
|
||||||
|
_VAL EQU 0x94 ; 148
|
||||||
|
_ASC EQU 0x95 ; 149
|
||||||
|
_CHR_ EQU 0x96 ; 150
|
||||||
|
_PEEK EQU 0x97 ; 151
|
||||||
|
; ?? 0x98 - 0x80 = 0x18
|
||||||
|
_OCT_ EQU 0x99 ; 153
|
||||||
|
_HEX_ EQU 0x9a ; 154
|
||||||
|
_LPOS EQU 0x9b ; 155
|
||||||
|
_CINT EQU 0x9c ; 156
|
||||||
|
_CSNG EQU 0x9d ; 157
|
||||||
|
_CDBL EQU 0x9e
|
||||||
|
_FIX EQU 0x9f ; 159
|
||||||
|
|
||||||
|
; ---------------------------------------------------
|
||||||
|
; Conversion functions
|
||||||
|
; ---------------------------------------------------
|
||||||
|
_CVI EQU 0xA0 ; 160
|
||||||
|
_CVS EQU 0xA1 ; 161
|
||||||
|
_CVD EQU 0xA2 ; 162
|
||||||
|
|
||||||
|
; ---------------------------------------------------
|
||||||
|
; Disk functions
|
||||||
|
; ---------------------------------------------------
|
||||||
|
|
||||||
|
_DSKF EQU 0xA3 ; 163
|
||||||
|
_EOF EQU 0xA4 ; 164
|
||||||
|
_LOC EQU 0xA5 ; 165
|
||||||
|
_LOF EQU 0xA6 ; 166
|
||||||
|
_FPOS EQU 0xA7 ; 167
|
||||||
|
|
||||||
|
|
||||||
|
; ---------------------------------------------------
|
||||||
|
; Conversion functions
|
||||||
|
; ---------------------------------------------------
|
||||||
|
_MKI_ EQU 0xA8 ; 168
|
||||||
|
_MKS_ EQU 0xA9 ; 169
|
||||||
|
_MKD_ EQU 0xAA ; 170
|
||||||
|
|
||||||
|
|
||||||
|
ASCII_TAB EQU 0x09 ; 9
|
||||||
|
ASCII_LF EQU 0x0a ; 10
|
||||||
|
ASCII_VTAB EQU 0x0b ; 11
|
||||||
|
ASCII_CR EQU 0x0d ; 13
|
||||||
|
ASCII_SP EQU 0x20 ; 32
|
||||||
|
ASCII_CUR EQU 0x24 ; 36
|
||||||
|
|
||||||
|
CTRL_O EQU 0x0f ; 15
|
||||||
|
|
||||||
|
_SPACE_ EQU 0x18 ; 24
|
||||||
|
_CDBL EQU 0x1e ; 30
|
||||||
|
|
||||||
|
|
||||||
|
_END EQU 0x81 ; 129
|
||||||
|
_FOR EQU 0x82 ; 130
|
||||||
|
_NEXT EQU 0x83 ; 131
|
||||||
|
_DATA EQU 0x84 ; 132
|
||||||
|
_INPUT EQU 0x85 ; 133
|
||||||
|
_DIM EQU 0x86 ; 134
|
||||||
|
_READ EQU 0x87 ; 135
|
||||||
|
_LET EQU 0x88 ; 136
|
||||||
|
_GOTO EQU 0x89 ; 137
|
||||||
|
_RUN EQU 0x8a ; 138
|
||||||
|
_IF EQU 0x8b ; 139
|
||||||
|
_RESTORE EQU 0x8c ; 140
|
||||||
|
_GOSUB EQU 0x8d ; 141
|
||||||
|
_RETURN EQU 0x8e ; 142
|
||||||
|
_REM EQU 0x8f ; 143
|
||||||
|
; ---------------------------------------------------
|
||||||
|
_STOP EQU 0x90 ; 144
|
||||||
|
_PRINT EQU 0x91 ; 145
|
||||||
|
_CLEAR EQU 0x92 ; 146
|
||||||
|
_LIST EQU 0x93 ; 147
|
||||||
|
_SCRATCH EQU 0x94
|
||||||
|
_ON EQU 0x95 ; 149
|
||||||
|
_WAIT EQU 0x96 ; 150
|
||||||
|
_DEF EQU 0x97 ; 151
|
||||||
|
_POKE EQU 0x98 ; 152
|
||||||
|
_CONT EQU 0x99 ; 153
|
||||||
|
_CSAVE EQU 0x9a ; 154
|
||||||
|
_CLOAD EQU 0x9b ; 155
|
||||||
|
_OUT EQU 0x9c ; 156
|
||||||
|
_LPRINT EQU 0x9d ; 157
|
||||||
|
_LLIST EQU 0x9e ; 158
|
||||||
|
_KEY EQU 0x9f ; 159
|
||||||
|
; ---------------------------------------------------
|
||||||
|
_WIDTH EQU 0xa0 ; 160
|
||||||
|
_ELSE EQU 0xa1 ; 161
|
||||||
|
_TRON EQU 0xa2 ; 162
|
||||||
|
_TROFF EQU 0xa3 ; 163
|
||||||
|
_SWAP EQU 0xa4 ; 164
|
||||||
|
_ERASE EQU 0xa5 ; 165
|
||||||
|
_EDIT EQU 0xa6 ; 166
|
||||||
|
_ERROR EQU 0xa7 ; 167
|
||||||
|
_RESUME EQU 0xa8 ; 168
|
||||||
|
_DELETE EQU 0xa9 ; 169
|
||||||
|
_AUTO EQU 0xaa ; 170
|
||||||
|
_RENUM EQU 0xab ; 171
|
||||||
|
_DEFSTR EQU 0xac ; 172
|
||||||
|
_DEFINT EQU 0xad ; 173
|
||||||
|
_DEFSNG EQU 0xae ; 174
|
||||||
|
_DEFDBL EQU 0xaf ; 175
|
||||||
|
; ---------------------------------------------------
|
||||||
|
_LINE EQU 0xb0 ; 176
|
||||||
|
_WHILE EQU 0xb1 ; 177
|
||||||
|
_WEND EQU 0xb2 ; 178
|
||||||
|
_CALL EQU 0xb3 ; 179
|
||||||
|
_BEEP EQU 0xb4 ; 180
|
||||||
|
_MON EQU 0xb5 ; 181
|
||||||
|
; ? b6
|
||||||
|
_WRITE EQU 0xb7 ; 183
|
||||||
|
_COMMON EQU 0xb8 ; 184
|
||||||
|
_CHAIN EQU 0xb9 ; 185
|
||||||
|
_OPTION EQU 0xba ; 186
|
||||||
|
_RANDOMIZE EQU 0xbb ; 187
|
||||||
|
_DSKO_ EQU 0xbc ; 188
|
||||||
|
_OPEN EQU 0xbd ; 189
|
||||||
|
_FIELD EQU 0xbe ; 190
|
||||||
|
_GET EQU 0xbf ; 191
|
||||||
|
; ---------------------------------------------------
|
||||||
|
_PUT EQU 0xc0 ; 192
|
||||||
|
_SET EQU 0xc1 ; 193
|
||||||
|
_CLOSE EQU 0xc2 ; 194
|
||||||
|
_LOAD EQU 0xc3 ; 195
|
||||||
|
_MERGE EQU 0xc4 ; 196
|
||||||
|
_FILES EQU 0xc5 ; 197
|
||||||
|
_NAME EQU 0xc6 ; 198
|
||||||
|
_KILL EQU 0xc7 ; 199
|
||||||
|
_LSET EQU 0xc8 ; 200
|
||||||
|
_RSET EQU 0xc9 ; 201
|
||||||
|
_SAVE EQU 0xca ; 202
|
||||||
|
_LFILES EQU 0xcb ; 203
|
||||||
|
_PSET EQU 0xcc ; 204
|
||||||
|
_PRESET EQU 0xcd ; 205
|
||||||
|
_COLOR EQU 0xce ; 206
|
||||||
|
_LOCATE EQU 0xcf ; 207
|
||||||
|
; ---------------------------------------------------
|
||||||
|
_CLS EQU 0xd0 ; 208
|
||||||
|
_CONSOLE EQU 0xd1 ; 209
|
||||||
|
;?
|
||||||
|
_TO EQU 0xd3 ; 211
|
||||||
|
_THEN EQU 0xd4 ; 212
|
||||||
|
_TAB EQU 0xd5 ; 213
|
||||||
|
_STEP EQU 0xd6 ; 214
|
||||||
|
_USR EQU 0xd7 ; 215
|
||||||
|
_FN EQU 0xd8 ; 216
|
||||||
|
_SPC EQU 0xd9 ; 217
|
||||||
|
; ?
|
||||||
|
_ERL EQU 0xdb ; 219
|
||||||
|
_ERR EQU 0xdc ; 220
|
||||||
|
_STRING_ EQU 0xdd ; 221
|
||||||
|
_USING EQU 0xde ; 222
|
||||||
|
_INSTR EQU 0xdf ; 223
|
||||||
|
; ---------------------------------------------------
|
||||||
|
; ? E0
|
||||||
|
_VARPTR EQU 0xe1 ; 225
|
||||||
|
_CSRLIN EQU 0xe2 ; 226
|
||||||
|
_ATTR_ EQU 0xe3 ; 227
|
||||||
|
_DSKI_ EQU 0xe4 ; 228
|
||||||
|
_POINT EQU 0xe5 ; 229
|
||||||
|
_INKEY EQU 0xe6 ; 230
|
||||||
|
|
||||||
|
_AND EQU 0xf6 ; 246
|
||||||
|
_OR EQU 0xf7 ; 247
|
||||||
|
_XOR EQU 0xf8 ; 248
|
||||||
|
_EQV EQU 0xf9 ; 249
|
||||||
|
_IMP EQU 0xfa ; 250
|
||||||
|
_MOD EQU 0xfb ; 251
|
||||||
@@ -0,0 +1,131 @@
|
|||||||
|
MB_ERRTAB:
|
||||||
|
db 0
|
||||||
|
MB_ERROR_MSGS:
|
||||||
|
DB "NEXT without FOR", 0 ; 1
|
||||||
|
DB "Syntax error", 0 ; 2
|
||||||
|
DB "RETURN without GOSUB", 0 ; 3
|
||||||
|
DB "Out of DATA", 0 ; 4
|
||||||
|
DB "Illegal function call", 0 ; 5
|
||||||
|
MB_OVRMSG:
|
||||||
|
DB "Overflow", 0 ; 6
|
||||||
|
DB "Out of memory", 0 ; 7
|
||||||
|
DB "Undefined line number", 0 ; 8
|
||||||
|
DB "Subscript out of range", 0 ; 9
|
||||||
|
DB "Duplicate Definition", 0 ; 10
|
||||||
|
MB_DBZ_MSG:
|
||||||
|
DB "Division by zero", 0 ; 11
|
||||||
|
DB "Illegal direct",0 ; 12
|
||||||
|
MSG_TYPE_MM:
|
||||||
|
DB "Type mismatch", 0 ; 13
|
||||||
|
DB "Out of string space", 0 ; 14
|
||||||
|
DB "String too long", 0 ; 15
|
||||||
|
DB "String formula too complex", 0 ; 16
|
||||||
|
|
||||||
|
DB "Can't continue", 0 ; 17
|
||||||
|
DB "Undefined user function", 0 ; 18
|
||||||
|
DB "No RESUME", 0 ; 19
|
||||||
|
DB "RESUME without error", 0 ; 20
|
||||||
|
DB "Unprintable error", 0 ; 21
|
||||||
|
DB "Missing operand", 0 ; 22
|
||||||
|
DB "Line buffer overflow", 0 ; 23
|
||||||
|
DB "Device I/O error", 0 ; 24
|
||||||
|
db '?', 0 ; 25
|
||||||
|
db '?', 0 ; 26
|
||||||
|
DB "FOR Without NEXT", 0 ; 27 - 0x1B
|
||||||
|
db '?', 0 ; 28
|
||||||
|
db '?', 0 ; 29
|
||||||
|
DB "WHILE without WEND", 0 ; 30
|
||||||
|
DB "WEND without WHILE", 0 ; 31
|
||||||
|
|
||||||
|
MSG_FOW_ERR:
|
||||||
|
DB "FIELD overflow", 0 ; 50
|
||||||
|
DB "Internal error", 0 ; 51
|
||||||
|
DB "Bad file number", 0 ; 52
|
||||||
|
DB "File not found", 0 ; 53
|
||||||
|
DB "File already open", 0 ; 54
|
||||||
|
DB "Disk not mounted", 0 ; 55
|
||||||
|
DB "Disk I/O error", 0 ; 56
|
||||||
|
DB "File already exists", 0 ; 57
|
||||||
|
db '?', 0 ; 58
|
||||||
|
DB "Disk already mounted", 0 ; 59
|
||||||
|
DB "Disk full",0 ; 60
|
||||||
|
DB "Input past end", 0 ; 61
|
||||||
|
DB "Bad file name", 0 ; 62
|
||||||
|
DB "Direct statement in file", 0 ; 63
|
||||||
|
DB "Bad allocation table", 0 ; 64
|
||||||
|
DB "Bad drive number", 0 ; 65
|
||||||
|
DB "Bad track/sector", 0 ; 66
|
||||||
|
DB "Deleted record", 0 ; 67
|
||||||
|
MSG_RAD_ERR:
|
||||||
|
DB "Rename across disks", 0 ; 68
|
||||||
|
DB "Sequential after PUT", 0 ; 69
|
||||||
|
DB "Sequential I/O only", 0 ; 70
|
||||||
|
DB "File not OPEN", 0 ; 71
|
||||||
|
DB "File write protected", 0 ; 72
|
||||||
|
DB "Disk offline", 0 ; 73
|
||||||
|
|
||||||
|
; --------------------------------------------------
|
||||||
|
; Error codes
|
||||||
|
; --------------------------------------------------
|
||||||
|
ERRNF EQU 0x01
|
||||||
|
ERRSN EQU 0x02 ; 2
|
||||||
|
ERRRG EQU 0x03 ; 3
|
||||||
|
ERROD EQU 0x04 ; 4
|
||||||
|
ERRFC EQU 0x05 ; 5
|
||||||
|
ERROV EQU 0x06 ; 6
|
||||||
|
ERROM EQU 0x07
|
||||||
|
ERRUS EQU 0x08 ; 8
|
||||||
|
ERRBS EQU 0x09 ; 9
|
||||||
|
ERRDD EQU 0x0a ; 10
|
||||||
|
ERRDV0 EQU 0x0b ; 11
|
||||||
|
ERRID EQU 0x0c ; 12
|
||||||
|
ERRTM EQU 0x0d ; 13
|
||||||
|
ERRSO EQU 0x0e ; Out of space
|
||||||
|
ERRLS EQU 0x0f ; 15
|
||||||
|
ERRST EQU 0x10 ; String formula too complex
|
||||||
|
ERRCN EQU 0x11 ; 17
|
||||||
|
ERRUF EQU 0x12 ; Undefined user function
|
||||||
|
ERRNR EQU 0x13 ; 19
|
||||||
|
ERRRE EQU 0x14 ; 20
|
||||||
|
ERRUE EQU 0x15 ; Unprintable error
|
||||||
|
ERRMO EQU 0x16 ; Missing operand
|
||||||
|
ERRLBO EQU 0x17 ; 23
|
||||||
|
ERRDIO EQU 0x18 ; Device I/O error
|
||||||
|
; skipped and 19, 1a
|
||||||
|
ERRFN EQU 0x1b ; 2
|
||||||
|
; skipped 1c and 1d
|
||||||
|
ERRWH EQU 0x1e ; 29
|
||||||
|
ERRWE EQU 0x1f ; 30
|
||||||
|
|
||||||
|
NONDSK EQU 0x1f ; Last non disk error
|
||||||
|
|
||||||
|
; Disk errors starts from here
|
||||||
|
DSKERR EQU 0x31 ; 49
|
||||||
|
;
|
||||||
|
ERRFOV EQU 0x32 ; 50
|
||||||
|
ERRIER EQU 0x33 ; 51
|
||||||
|
ERRBFN EQU 0x34 ; 52
|
||||||
|
ERRFNF EQU 0x35 ; 53
|
||||||
|
ERRFAO EQU 0x36 ; 54
|
||||||
|
ERRDNM EQU 0x37 ; 55
|
||||||
|
ERRIOE EQU 0x38 ; 56
|
||||||
|
ERRFAE EQU 0x39 ; 57
|
||||||
|
; 0x3a - 58
|
||||||
|
ERRDAM EQU 0x3b ; 59 Disk already mounted
|
||||||
|
ERRDFL EQU 0x3c ; 60 Disk full
|
||||||
|
ERRRPE EQU 0x3d ; 61 Inp past end
|
||||||
|
ERRBFL EQU 0x3e ; 62 Bad file name
|
||||||
|
ERRDSF EQU 0x3f ; 63 Direct statement in file
|
||||||
|
ERRBAT EQU 0x40 ; 64 Bad alloc table
|
||||||
|
ERRBDN EQU 0x41 ; 65
|
||||||
|
ERRBTS EQU 0x42 ; 66 Bad trk/sec
|
||||||
|
ERRDLR EQU 0x43 ; 67 Deleted record
|
||||||
|
|
||||||
|
ERRRAD EQU 0x44 ; 68 ren across disks
|
||||||
|
ERRSAP EQU 0x45 ; 69 Seq aft PUT
|
||||||
|
ERRSIO EQU 0x46 ; 70 Seq I/O only
|
||||||
|
ERRFNO EQU 0x47 ; 71 File not open
|
||||||
|
ERRFWP EQU 0x49 ; 72 File protected
|
||||||
|
ERRDOF EQU 0x48 ; 73 Disk offline
|
||||||
|
|
||||||
|
; --------------------------------------------------
|
||||||
Reference in new issue
Block a user