Compare commits
5
Commits
00610b2925
...
1182547754
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1182547754 | ||
|
|
695cae7bc9 | ||
|
|
051dda5cbc | ||
|
|
9a0f2ddf13 | ||
|
|
4f26befd74 |
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_ - 0x80
|
||||
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_ - 0x80
|
||||
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_ - 0x80
|
||||
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", '(' + 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 - 0x80
|
||||
DB 0
|
||||
; ---------------------------------------------------
|
||||
TTAB:
|
||||
DB "HE", 'N' + 0x80, _THEN
|
||||
DB "RO", 'N' + 0x80, _TRON
|
||||
DB "ROF", 'F' + 0x80, _TROFF
|
||||
DB "AB", '(' + 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,100 @@
|
||||
; ===================================================
|
||||
; 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 ERRLBO + 1 ; <NONDSK - standart BASIC errors
|
||||
|
||||
; --------------------------------------------------
|
||||
DSKERR EQU 0x31 ; >DSKERR - disk BASIC errors
|
||||
|
||||
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 ERRFNO + 1
|
||||
|
||||
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 PSSR_OUT_D
|
||||
WRPRIM:
|
||||
OUT (PSSR), A
|
||||
LD (HL), E
|
||||
PSSR_OUT_D:
|
||||
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
+12407
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_LPRINT
|
||||
DW MB_LLIST
|
||||
DW 0
|
||||
DW 0x0000
|
||||
DW MB_WIDTH
|
||||
DW MB_REM
|
||||
|
||||
DW MB_TON
|
||||
DW MB_TOFF
|
||||
DW MB_SWAP
|
||||
|
||||
DW MB_ERASE
|
||||
DW MB_EDIT
|
||||
DW MB_ERRORS
|
||||
@@ -59,8 +61,8 @@ MB_STMDSP:
|
||||
DW MB_DEFREA
|
||||
DW MB_DEFDBL
|
||||
DW MB_LINE
|
||||
DW 0
|
||||
DW 0
|
||||
DW 0x0000
|
||||
DW 0x0000
|
||||
DW MB_WHILE
|
||||
DW MB_WEND
|
||||
DW MB_CALLS
|
||||
@@ -69,9 +71,9 @@ MB_STMDSP:
|
||||
DW MB_CHAIN
|
||||
DW MB_OPTION
|
||||
DW MB_RANDOM
|
||||
DW 0
|
||||
DW 0x0000
|
||||
DW MB_SYSTEM
|
||||
DW 0
|
||||
DW 0x0000
|
||||
DW MB_OPEN
|
||||
DW MB_FIELD
|
||||
DW MB_GET
|
||||
@@ -128,18 +130,26 @@ MB_FUNDSP:
|
||||
DW MB_FRCDBL
|
||||
DW MB_FIXER
|
||||
|
||||
DS 22, 0
|
||||
DS 22, 0
|
||||
|
||||
; ---------------------------------------------------
|
||||
; DISK FUNCTIONS
|
||||
; Conversion functions
|
||||
; ---------------------------------------------------
|
||||
DW MB_CVI
|
||||
DW MB_CVS
|
||||
DW MB_CVD
|
||||
DW WARM_BOOT
|
||||
DW 0x0000
|
||||
|
||||
; ---------------------------------------------------
|
||||
; Disk functions
|
||||
; ---------------------------------------------------
|
||||
DW MB_EOF
|
||||
DW MB_LOC
|
||||
DW MB_LOF
|
||||
|
||||
; ---------------------------------------------------
|
||||
; Conversion functions
|
||||
; ---------------------------------------------------
|
||||
DW MB_MKI_
|
||||
DW MB_MKS_
|
||||
DW MB_MKD_
|
||||
|
||||
+73
-82
@@ -67,6 +67,7 @@ _DEFSNG EQU 175 ; 0xAF
|
||||
_DEFDBL EQU 176 ; 0xB0
|
||||
_LINE EQU 177 ; 0xB1
|
||||
_WHILE EQU 180 ; 0xB4
|
||||
_BEEP EQU 180 ; 0xB4 ToDo: doublecheck!
|
||||
_WEND EQU 181 ; 0xB5
|
||||
_CALL EQU 182 ; 0xB6
|
||||
_WRITE EQU 183 ; 0xB7
|
||||
@@ -101,6 +102,8 @@ NUMCMD EQU _RESET - _END + 1 ; 76
|
||||
; ---------------------------------------------------
|
||||
|
||||
_TO EQU 206 ; 0xCE
|
||||
_COLOR EQU 206 ; 0xCE ToDo: Double check!
|
||||
|
||||
TOTK EQU 206
|
||||
|
||||
_THEN EQU 207 ; 0xCF
|
||||
@@ -160,19 +163,21 @@ _VARPTR EQU 220 ; 0xDC
|
||||
|
||||
_INKEY EQU 221 ; 0xDD
|
||||
|
||||
; ---------------------------------------------------
|
||||
; Extended OK-240 operators
|
||||
; ---------------------------------------------------
|
||||
EXT_OP_FIRST EQU 224
|
||||
_CLS EQU 224 ; 0xE0
|
||||
_SCRN EQU 225 ; 0xE1
|
||||
_COLOR EQU 226 ; 0xE2
|
||||
_CURS EQU 227 ; 0xE3
|
||||
_PLOT EQU 228 ; 0xE4
|
||||
_RECT EQU 229 ; 0xE5
|
||||
_GPRINT EQU 230 ; 0xE6
|
||||
_TONE EQU 231 ; 0xE7
|
||||
EXT_OP_LAST EQU 231
|
||||
; ; ---------------------------------------------------
|
||||
; ; Extended OK-240 operators
|
||||
; ; ---------------------------------------------------
|
||||
; EXT_OP_FIRST EQU 224
|
||||
; _CLS EQU 224 ; 0xE0
|
||||
; _SCRN EQU 225 ; 0xE1
|
||||
; _COLOR EQU 226 ; 0xE2
|
||||
; _CURS EQU 227 ; 0xE3
|
||||
; _PLOT EQU 228 ; 0xE4
|
||||
; _RECT EQU 229 ; 0xE5
|
||||
; _GPRINT EQU 230 ; 0xE6
|
||||
; _TONE EQU 231 ; 0xE7
|
||||
;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
|
||||
N2 EQU 13 ; Number of bytes to use from SINCON
|
||||
|
||||
OCTCON EQU 11 ; EMBEDED OCTAL CONSTANT
|
||||
HEXCON EQU 12 ; EMBEDED CONSTANT
|
||||
PTRCON EQU 13 ; A LINE REFERENCE CONSTANT
|
||||
LINCON EQU 14 ; A LINE NUMBER UNCONVERTED TO POINTER
|
||||
IN2CON EQU 15 ; SINGLE BYTE (TWO BYTE WITH TOKEN) INTEGER
|
||||
CONCN2 EQU 16 ; TOKEN RETURNED SECOND TYPE CONSTANT IS SCANNED.
|
||||
ONECON EQU 17 ; FIRST OF 10 (0-9) INTEGER SPECIAL TOKENS
|
||||
INTCON EQU 28 ; REGULAR 16 BIT TWO'S COMPLEMENT INT
|
||||
SNGCON EQU 29 ; SINGLE PREC (4 BYTE) CONSTANT
|
||||
CONCON EQU 30 ; TOKEN RETURNED BY CHRGET AFTER CONSTANT SCANNED
|
||||
DBLCON EQU 31 ; DOUBLE PREC (8 BYTE) CONSTANT
|
||||
; --------------------------------------------------
|
||||
; 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
|
||||
|
||||
|
||||
; --------------------------------------------------
|
||||
; ASCII codes
|
||||
; --------------------------------------------------
|
||||
|
||||
ASCII_NUL EQU 0x00 ; NUL (null)
|
||||
ASCII_EOT EQU 0x04 ; EOT (End of transmission)
|
||||
ASCII_BELL EQU 0x07 ; 7
|
||||
ASCII_BKSP EQU 0x08 ; 8
|
||||
ASCII_TAB EQU 0x09 ; 9
|
||||
ASCII_LF EQU 0x0a ; 10
|
||||
ASCII_CR EQU 0x0d ; 13
|
||||
ASCII_DEL EQU 0x7f ; 127
|
||||
ASCII_ESC EQU 0x1b ;
|
||||
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)
|
||||
|
||||
; --------------------------------------------------
|
||||
; Key codes
|
||||
@@ -368,7 +382,7 @@ CTRL_O EQU 0x0f ; 15
|
||||
CTRL_R EQU 0x12 ; 18
|
||||
CTRL_U EQU 0x15 ; 21
|
||||
CTRL_X EQU 0x18 ; 24
|
||||
|
||||
CTRL_Z EQU 0x1A
|
||||
|
||||
CLMWID EQU 0x0e ; 14
|
||||
CON1 EQU 0x2c20 ; ' ',
|
||||
@@ -392,56 +406,6 @@ DBLK.C EQU DBLKSZ ; SIZE OF A FILE INFO BLOCK
|
||||
|
||||
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.PHY EQU 0xab ; 171
|
||||
@@ -467,4 +431,31 @@ NMREL EQU 0x03 ; 3
|
||||
PRMSIZ EQU 0x64 ; 100
|
||||
SQO EQU 0x02 ; 2
|
||||
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
|
||||
; --------------------------------------------------
|
||||
MB_OPTAB:
|
||||
DB 121
|
||||
DB 121
|
||||
DB 124
|
||||
DB 124
|
||||
DB 127
|
||||
DB 80
|
||||
DB 70
|
||||
DB 60 ; PRECEDENCE OF "XOR"
|
||||
DB 50 ; PRECEDENCE OF "EQV"
|
||||
DB 40 ; PRECEDENCE OF "IMP"
|
||||
DB 122 ; PRECEDENCE OF "MOD"
|
||||
DB 123 ; PRECEDENCE OF "IDIV"
|
||||
DB 121 ; +
|
||||
DB 121 ; -
|
||||
DB 124 ; *
|
||||
DB 124 ; /
|
||||
DB 127 ; ^
|
||||
DB 80 ; OR
|
||||
DB 70 ; AND
|
||||
DB 60 ; XOR
|
||||
DB 50 ; EQV
|
||||
DB 40 ; IMP
|
||||
DB 122 ; MOD
|
||||
DB 123 ; IDIV
|
||||
|
||||
; --------------------------------------------------
|
||||
; USED BY ASSIGNMENT CODE TO FORCE THE RIGHT HAND VALUE
|
||||
@@ -70,63 +70,7 @@ MB_INTDSP:
|
||||
MB_ERRTAB:
|
||||
DB 0
|
||||
|
||||
; ---------------------------------------------------
|
||||
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
|
||||
|
||||
include "errors.inc"
|
||||
|
||||
; ---------------------------------------------------
|
||||
MB_USRTAB:
|
||||
@@ -207,11 +151,7 @@ MB_NAMCNT:
|
||||
DB 0
|
||||
|
||||
MB_NAMBUF:
|
||||
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, 0x00, 0x00
|
||||
DB 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
.38 DB 0x00
|
||||
|
||||
; TEMP STORAGE DURING NAME SAVE AT INDLOP
|
||||
MB_NAMTMP:
|
||||
@@ -221,12 +161,7 @@ MB_FILNA2:
|
||||
.16 DB 0x00
|
||||
|
||||
MB_FILNAM:
|
||||
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, 0x00, 0x00
|
||||
DB 0x00
|
||||
|
||||
.33 DB 0x00
|
||||
|
||||
MB_CPMVRN:
|
||||
DB 0 ; CP/M Version Number (#0 is 2.x)
|
||||
@@ -451,20 +386,20 @@ MB_TRCFLG:
|
||||
|
||||
|
||||
MB_FLOAT_ACC:
|
||||
DB 0 ; FLOATING ACCUMULATOR
|
||||
DB 0 ; FLOATING ACCUMULATOR
|
||||
|
||||
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:
|
||||
DB 0, 0 ; MIDDLE ORDER OF MANTISSA
|
||||
DB 0 ; HIGH ORDER OF MANTISSA
|
||||
DB 0, 0 ; MIDDLE ORDER OF MANTISSA
|
||||
DB 0 ; HIGH ORDER OF MANTISSA
|
||||
|
||||
MB_FAC:
|
||||
DB 0, 0 ; EXPONENT
|
||||
DB 0, 0 ; EXPONENT
|
||||
|
||||
MB_FLGOVC:
|
||||
DB 0 ; OVERFLOW PRINT FLAG, =0, 1 PRINT
|
||||
DB 0 ; OVERFLOW PRINT FLAG, =0, 1 PRINT
|
||||
|
||||
MB_OVCSTR:
|
||||
DB 0
|
||||
|
||||
+754
-226
File diff suppressed because it is too large.
Load diff
+3
-3
@@ -129,8 +129,8 @@ MB_LTAB:
|
||||
|
||||
; ---------------------------------------------------
|
||||
MB_MTAB:
|
||||
DB "ERG", 'E' OR 0x80, 0xC5
|
||||
DB 'O', 'D' OR 0x80, 0xFC
|
||||
DB "ERG", 'E' OR 0x80, _MERGE
|
||||
DB 'O', 'D' OR 0x80, _MOD
|
||||
DB "KI", '$' OR 0x80, _MKI_ - 0x80
|
||||
DB "KS", '$' OR 0x80, _MKS_ - 0x80
|
||||
DB "KD", '$' OR 0x80, _MKD_ - 0x80
|
||||
@@ -246,7 +246,7 @@ MB_ZTAB:
|
||||
DB 0
|
||||
|
||||
; ---------------------------------------------------
|
||||
;
|
||||
; Special character table
|
||||
; ---------------------------------------------------
|
||||
MB_SPCTAB:
|
||||
DB '+' OR 0x80
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Microsoft BASIC-80 CP/M for Alphatronic computer
|
||||
|
||||
Source codes of Microsoft Basic-80 v5.26, for CP/M OS, for Triumph Adler Alphatronic PC (Z80 CPU, 64k RAM).
|
||||
|
||||
- I tried to keep the original label names as they are in the source codes published by Microsoft.
|
||||
|
||||
## Compile
|
||||
|
||||
To compile sources, use [sjasmplus Z80 assembler](https://github.com/z00m128/sjasmplus).
|
||||
@@ -0,0 +1,506 @@
|
||||
; ===================================================
|
||||
; Microsoft Basic-80 v5.26, for CP/M OS, for Triumph
|
||||
; Adler Alphatronic PC.
|
||||
;
|
||||
; Operator and function dispatch tables
|
||||
; Disassembled by Romychs @ 2026-09-16
|
||||
; ===================================================
|
||||
|
||||
; ---------------------------------------------------
|
||||
; Statement dispatch table
|
||||
; ---------------------------------------------------
|
||||
MB_STMDSP:
|
||||
DW MB_ENDS
|
||||
DW MB_FOR
|
||||
DW MB_NEXT
|
||||
DW MB_DATAS
|
||||
DW MB_INPUT
|
||||
DW MB_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_NEWS
|
||||
DW MB_ONGOTO
|
||||
DW MB_FNWAIT
|
||||
DW MB_DEF
|
||||
DW MB_POKE
|
||||
DW MB_CONT
|
||||
DW MB_CSAVE
|
||||
DW MB_CLOAD
|
||||
DW MB_FNOUT
|
||||
DW MB_LPRINT
|
||||
DW MB_LLIST
|
||||
DW MB_KEY
|
||||
; 0xA0..0xAF ---------------------------------------
|
||||
DW MB_WIDTH
|
||||
DW MB_REM_ELSE
|
||||
DW MB_TON
|
||||
DW MB_TOFF
|
||||
DW MB_SWAP
|
||||
DW MB_ERASE
|
||||
DW MB_EDIT
|
||||
DW MB_ERRORS
|
||||
DW MB_RESUME
|
||||
DW MB_DELETE
|
||||
DW MB_AUTO
|
||||
DW MB_RESEQ ; RENUM
|
||||
DW MB_DEFSTR
|
||||
DW MB_DEFINT
|
||||
DW MB_DEFSNG
|
||||
DW MB_DEFDBL
|
||||
; 0xB0..0xBF ---------------------------------------
|
||||
DW MB_LINE
|
||||
DW MB_WHILE
|
||||
DW MB_WEND
|
||||
DW MB_CALLS
|
||||
DW MB_BEEP
|
||||
DW MB_MON
|
||||
DW 0 ; none
|
||||
DW MB_WRITE
|
||||
DW MB_DATAS ; ex MB_COMMON
|
||||
DW MB_CHAIN
|
||||
DW MB_OPTION
|
||||
DW MB_RANDOM
|
||||
DW MB_DSKOFN
|
||||
DW MB_OPEN
|
||||
DW MB_FIELD
|
||||
DW MB_GET
|
||||
; 0xC0..0xCF ---------------------------------------
|
||||
DW MB_PUT
|
||||
DW MB_SET
|
||||
DW MB_CLOSE
|
||||
DW MB_LOAD
|
||||
DW MB_MERGE
|
||||
DW MB_FILES
|
||||
DW MB_NAME
|
||||
DW MB_KILL
|
||||
DW MB_LSET
|
||||
DW MB_RSET
|
||||
DW MB_SAVE
|
||||
DW MB_LFILES
|
||||
DW MB_PSET
|
||||
DW MB_PRESET
|
||||
DW MB_COLOR
|
||||
DW MB_LOCATE
|
||||
; 0xD0..0xDF ---------------------------------------
|
||||
DW MB_CLS
|
||||
DW MB_CONSOLE
|
||||
|
||||
; ---------------------------------------------------
|
||||
; Function dispatch table
|
||||
; ---------------------------------------------------
|
||||
; 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_SPACE_
|
||||
DW MB_OCT_
|
||||
DW MB_HEX_
|
||||
DW MB_LPOS
|
||||
DW MB_FRCINT
|
||||
DW MB_FRCSNG
|
||||
DW MB_FRCDBL
|
||||
DW MB_FIXER
|
||||
; 0xA0..0xA2
|
||||
DW MB_CVI
|
||||
DW MB_CVS
|
||||
DW MB_CVD
|
||||
|
||||
; --------------------------------------------------
|
||||
; Disk functions
|
||||
; --------------------------------------------------
|
||||
; 0xA3..0xA7
|
||||
DW MB_DSKF
|
||||
DW MB_EOF
|
||||
DW MB_LOC
|
||||
DW MB_LOF
|
||||
DW MB_FPOS
|
||||
; --------------------------------------------------
|
||||
; Conversion functions
|
||||
; --------------------------------------------------
|
||||
; 0xA8..0xAA
|
||||
DW MB_MKI_
|
||||
DW MB_MKS_
|
||||
DW MB_MKD_
|
||||
|
||||
|
||||
; ---------------------------------------------------
|
||||
; Alphabetic operator and function dispatch table
|
||||
; ---------------------------------------------------
|
||||
MB_ALPTAB:
|
||||
DW MB_ATAB
|
||||
DW MB_BTAB
|
||||
DW MB_CTAB
|
||||
DW MB_DTAB
|
||||
DW MB_ETAB
|
||||
DW MB_FTAB
|
||||
DW MB_GTAB
|
||||
DW MB_HTAB
|
||||
DW MB_ITAB
|
||||
DW MB_JTAB
|
||||
DW MB_KTAB
|
||||
DW MB_LTAB
|
||||
DW MB_MTAB
|
||||
DW MB_NTAB
|
||||
DW MB_OTAB
|
||||
DW MB_PTAB
|
||||
DW MB_QTAB
|
||||
DW MB_RTAB
|
||||
DW MB_STAB
|
||||
DW MB_TTAB
|
||||
DW MB_UTAB
|
||||
DW MB_VTAB
|
||||
DW MB_WTAB
|
||||
DW MB_XTAB
|
||||
DW MB_YTAB
|
||||
DW MB_ZTAB
|
||||
|
||||
; ---------------------------------------------------
|
||||
; Alphabetic character by character
|
||||
; operator and function table
|
||||
; ---------------------------------------------------
|
||||
|
||||
; ---------------------------------------------------
|
||||
MB_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
|
||||
; ---------------------------------------------------
|
||||
MB_BTAB:
|
||||
DB "EE", 'P' + 0x80, _BEEP
|
||||
DB 0
|
||||
; ---------------------------------------------------
|
||||
MB_CTAB:
|
||||
DB "OLO", 'R' + 0x80, _COLOR
|
||||
DB "ONSOL", 'E' + 0x80, _CONSOLE
|
||||
DB "LOS", 'E' + 0x80, _CLOSE
|
||||
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 "AL", 'L' + 0x80, _CALL
|
||||
DB "OMMO", 'N' + 0x80, _COMMON
|
||||
DB "HAI", 'N' + 0x80, _CHAIN
|
||||
DB "L", 'S' + 0x80, _CLS
|
||||
DB 0
|
||||
; ---------------------------------------------------
|
||||
MB_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 - 0x80
|
||||
DB 0
|
||||
; ---------------------------------------------------
|
||||
MB_ETAB:
|
||||
DB "LS", 'E' + 0x80, _ELSE
|
||||
DB "N", 'D' + 0x80, _END
|
||||
DB "RAS", 'E' + 0x80, _ERASE
|
||||
DB "DI", 'T' + 0x80, _EDIT
|
||||
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
|
||||
; ---------------------------------------------------
|
||||
MB_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
|
||||
; ---------------------------------------------------
|
||||
MB_GTAB:
|
||||
DB "OT", 'O' + 0x80, _GOTO
|
||||
DB "O T", 'O' + 0x80, _GOTO
|
||||
DB "OSU", 'B' + 0x80, _GOSUB
|
||||
DB "E", 'T' + 0x80, _GET
|
||||
DB 0
|
||||
; ---------------------------------------------------
|
||||
MB_HTAB:
|
||||
DB "EX", '$' + 0x80, _HEX_ - 0x80
|
||||
DB 0
|
||||
; ---------------------------------------------------
|
||||
MB_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 0
|
||||
; ---------------------------------------------------
|
||||
MB_JTAB:
|
||||
DB 0
|
||||
; ---------------------------------------------------
|
||||
MB_KTAB:
|
||||
DB "IL", 'L' + 0x80, _KILL
|
||||
DB "E", 'Y' + 0x80, _KEY
|
||||
DB 0
|
||||
; ---------------------------------------------------
|
||||
MB_LTAB:
|
||||
DB "OCAT", 'E' + 0x80, _LOCATE
|
||||
DB "PRIN", 'T' + 0x80, _LPRINT
|
||||
DB "LIS", 'T' + 0x80, _LLIST
|
||||
DB "PO", 'S' + 0x80, _LPOS - 0x80
|
||||
DB "E", 'T' + 0x80, _LET
|
||||
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_ - 0x80
|
||||
DB "O", 'F' + 0x80, _LOF - 0x80
|
||||
DB 0
|
||||
; ---------------------------------------------------
|
||||
MB_MTAB:
|
||||
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 "O", 'N' + 0x80, _MON
|
||||
DB 0
|
||||
; ---------------------------------------------------
|
||||
MB_NTAB:
|
||||
DB "EX", 'T' + 0x80, _NEXT
|
||||
DB "AM", 'E' + 0x80, _NAME
|
||||
DB "E", 'W' + 0x80, _NEW ; alias for SCRATCH
|
||||
DB "O", 'T' + 0x80, _NOT
|
||||
DB 0
|
||||
; ---------------------------------------------------
|
||||
MB_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 "PTIO", 'N' + 0x80, _OPTION
|
||||
DB 0
|
||||
; ---------------------------------------------------
|
||||
MB_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 0
|
||||
; ---------------------------------------------------
|
||||
MB_QTAB:
|
||||
DB 0
|
||||
; ---------------------------------------------------
|
||||
MB_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 "ANDOMIZ",'E' + 0x80, _RANDOMIZE
|
||||
DB 0
|
||||
; ---------------------------------------------------
|
||||
MB_STAB:
|
||||
DB "TO", 'P' + 0x80, _STOP
|
||||
DB "WA", 'P' + 0x80, _SWAP
|
||||
DB "E", 'T' + 0x80, _SET
|
||||
DB "AV", 'E' + 0x80, _SAVE
|
||||
DB "PC", '(' + 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_
|
||||
DB 0
|
||||
; ---------------------------------------------------
|
||||
MB_TTAB:
|
||||
DB "HE", 'N' + 0x80, _THEN
|
||||
DB "RO", 'N' + 0x80, _TRON
|
||||
DB "ROF", 'F' + 0x80, _TROFF
|
||||
DB "AB", '(' + 0x80, _TAB
|
||||
DB 'O' + 0x80, _TO
|
||||
DB "A", 'N' + 0x80, _TAN - 0x80
|
||||
DB 0
|
||||
; ---------------------------------------------------
|
||||
MB_UTAB:
|
||||
DB "SIN", 'G' + 0x80, _USING
|
||||
DB "S", 'R' + 0x80, _USR
|
||||
DB 0
|
||||
; ---------------------------------------------------
|
||||
MB_VTAB:
|
||||
DB "A", 'L' + 0x80, _VAL - 0x80
|
||||
DB "ARPT", 'R' + 0x80, _VARPTR
|
||||
DB 0
|
||||
; ---------------------------------------------------
|
||||
MB_WTAB:
|
||||
DB "IDT", 'H' + 0x80, _WIDTH
|
||||
DB "AI", 'T' + 0x80, _WAIT
|
||||
DB "HIL", 'E' + 0x80, _WHILE
|
||||
DB "EN", 'D' + 0x80, _WEND
|
||||
DB "RIT", 'E' + 0x80, _WRITE
|
||||
DB 0
|
||||
; ---------------------------------------------------
|
||||
MB_XTAB:
|
||||
DB "O", 'R' + 0x80, _XOR
|
||||
DB 0
|
||||
; ---------------------------------------------------
|
||||
MB_YTAB:
|
||||
DB 0
|
||||
; ---------------------------------------------------
|
||||
MB_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 ; OR
|
||||
DB 70 ; AND
|
||||
DB 60 ; XOR
|
||||
DB 50 ; EQV
|
||||
DB 40 ; IMP
|
||||
DB 122 ; MOD
|
||||
DB 123 ; IDIV
|
||||
|
||||
; ---------------------------------------------------
|
||||
MB_FRCTBL:
|
||||
DW MB_FRCDBL
|
||||
DW 0
|
||||
DW MB_FRCINT
|
||||
DW MB_CHKSTR
|
||||
DW MB_FRCSNG
|
||||
|
||||
; ---------------------------------------------------
|
||||
; Double real (8b) Operations displacement table
|
||||
; ---------------------------------------------------
|
||||
MB_DBLDSP:
|
||||
DW MB_DADD
|
||||
DW MB_DSUB
|
||||
DW MB_DMULT
|
||||
DW MB_DDIV
|
||||
DW MB_DEXP
|
||||
DW MB_DCOMP
|
||||
|
||||
; ---------------------------------------------------
|
||||
; Single real (4b) Operations displacement table
|
||||
; ---------------------------------------------------
|
||||
MB_SNGDSP:
|
||||
DW MB_FADD
|
||||
DW MB_FSUB
|
||||
DW MB_FMUL
|
||||
DW MB_FDIV
|
||||
DW MB_FEXP
|
||||
DW MB_FCOMP
|
||||
|
||||
; ---------------------------------------------------
|
||||
; INTEGER Operations displacement table
|
||||
; ---------------------------------------------------
|
||||
MB_INTDSP:
|
||||
DW MB_IADD
|
||||
DW MB_ISUB
|
||||
DW MB_IMUL
|
||||
DW MB_INTDIV
|
||||
DW MB_IEXP
|
||||
DW MB_ICOMP
|
||||
@@ -0,0 +1,357 @@
|
||||
; ===================================================
|
||||
; Microsoft Basic-80 v5.26, for CP/M OS, for Triumph
|
||||
; Adler Alphatronic PC.
|
||||
;
|
||||
; Constants
|
||||
; Disassembled by Romychs @ 2026-09-16
|
||||
; ===================================================
|
||||
|
||||
; --------------------------------------------------
|
||||
; ASCII codes
|
||||
; --------------------------------------------------
|
||||
ASCII_NUL EQU 0x00 ; 0 - NUL (null)
|
||||
ASCII_EOT EQU 0x04 ; 4 - EOT (End of transmission)
|
||||
ASCII_BELL EQU 0x07 ; 7 - Beep sound
|
||||
ASCII_BS EQU 0x08 ; 8 - Back Space
|
||||
ASCII_TAB EQU 0x09 ; 9 - HT - Horizontal tab
|
||||
ASCII_LF EQU 0x0A ; 10 - LF (Line feed)
|
||||
ASCII_VTAB EQU 0x0B ; 11 - Vertical TAB
|
||||
ASCII_FF EQU 0x0C ; 12 - Form Feed
|
||||
ASCII_CR EQU 0x0D ; 13 - CR (Carriage return)
|
||||
ASCII_ESC EQU 0x1B ; 27 - ESC (Escape)
|
||||
ASCII_SP EQU 0x20 ; 32 - Space
|
||||
ASCII_CUR EQU 0x24 ; $
|
||||
ASCII_SQ EQU 0x27 ; '
|
||||
ASCII_BKSL EQU 0x5C ; \
|
||||
ASCII_DEL EQU 0x7F ; 127 - DEL (Delete)
|
||||
|
||||
CTRL_B EQU 0x02 ; Move the cursor back one word
|
||||
CTRL_C EQU 0x03 ; Break
|
||||
CTRL_E EQU 0x05 ; Delete to end of string
|
||||
CTRL_F EQU 0x06 ; Go to the beginning of the next word
|
||||
CTRL_N EQU 0x0E ; Go to to end of line
|
||||
CTRL_O EQU 0x0F ;
|
||||
CTRL_L EQU 0x0C ; Clear screen
|
||||
CTRL_U EQU 0x15 ; Delete line
|
||||
|
||||
KEY_HOME EQU 0x0B
|
||||
KEY_INS EQU 0x12
|
||||
|
||||
KEY_RT EQU 0x1C ; Move cursor Right
|
||||
KEY_LT EQU 0x1D ; Move cursor Left
|
||||
KEY_UP EQU 0x1E ; Move cursor Up
|
||||
KEY_DN EQU 0x1F ; Move cursor Down
|
||||
|
||||
KEY_F1 EQU 0x81 ; Functional key 1
|
||||
KEY_F2 EQU 0x82 ; Functional key 2
|
||||
KEY_F3 EQU 0x83 ; Functional key 3
|
||||
KEY_F4 EQU 0x84 ; Functional key 4
|
||||
KEY_F5 EQU 0x85 ; Functional key 5
|
||||
KEY_F6 EQU 0x86 ; Functional key 6
|
||||
KEY_F7 EQU 0x87 ; Functional key 7
|
||||
KEY_F8 EQU 0x88 ; Functional key 8
|
||||
KEY_F9 EQU 0x89 ; Functional key 9
|
||||
KEY_F10 EQU 0x8A ; Functional key 10
|
||||
KEY_F11 EQU 0x8B ; Functional key 11
|
||||
KEY_F12 EQU 0x87 ; Functional key 12
|
||||
|
||||
|
||||
|
||||
|
||||
_SPACE_ EQU 0x18 ; 24
|
||||
;_CDBL EQU 0x1e ; 30
|
||||
|
||||
|
||||
; --------------------------------------------------
|
||||
; 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
|
||||
|
||||
; ToDo: check usage
|
||||
SNGCON EQU 0x1D ; 29 4-byte single precision real EEDDDDDD
|
||||
CONCON EQU 0x1E ; 30 Internal token, returned by CHARGET after constant scanned
|
||||
|
||||
; ToDo: check usage
|
||||
DBLCON EQU 0x1F ; 31 8-byte double precision real EEDDDDDDDDDDDDDD
|
||||
|
||||
|
||||
; --------------------------------------------------
|
||||
; Statement tokens
|
||||
; --------------------------------------------------
|
||||
_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
|
||||
_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
|
||||
_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
|
||||
; 0xd0..0xd1 ---------------------------------------
|
||||
_CLS EQU 0xd0 ; 208
|
||||
_CONSOLE EQU 0xd1 ; 209
|
||||
|
||||
NUMCMD EQU _CONSOLE - _END + 1
|
||||
|
||||
; ---------------------------------------------------
|
||||
; Function tokens
|
||||
; ---------------------------------------------------
|
||||
;d2?
|
||||
_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
|
||||
_NOT EQU 0xda ; 218
|
||||
_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
|
||||
|
||||
LESSTK EQU 0xf0
|
||||
PLUSTK EQU 0xf1
|
||||
MINUTK EQU 0xf2
|
||||
MULTK EQU 0xf3
|
||||
DIVTK EQU 0xf4
|
||||
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
|
||||
IDIVTK EQU 0xfc
|
||||
|
||||
LSTOPK EQU IDIVTK + 1 - PLUSTK ; 0x0C 12
|
||||
|
||||
; ---------------------------------------------------
|
||||
; Extended function tokens
|
||||
; ---------------------------------------------------
|
||||
ONEFUN EQU 0x81
|
||||
_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
|
||||
|
||||
NUMGFN EQU 2 * _MID_ - 2 * ONEFUN + 1 ;
|
||||
BOTCON EQU (_SQR - ONEFUN) * 2
|
||||
|
||||
|
||||
; ---------------------------------------------------
|
||||
_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
|
||||
|
||||
|
||||
; --------------------------------------------------
|
||||
; Operation tokens
|
||||
; --------------------------------------------------
|
||||
TABTK EQU 0xdb
|
||||
|
||||
SNGQTK EQU 0xe0
|
||||
USINTK EQU 0xe4
|
||||
GREATK EQU 0xee
|
||||
EQULTK EQU 0xef
|
||||
|
||||
|
||||
; --------------------------------------------------
|
||||
; 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
|
||||
|
||||
; --------------------------------------------------
|
||||
; File access mode
|
||||
; --------------------------------------------------
|
||||
MD.SQI EQU 1 ; seq inp
|
||||
MD.SQO EQU 2 ; seq out
|
||||
MD.RND EQU 3 ; random
|
||||
|
||||
; --------------------------------------------------
|
||||
; 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
|
||||
JP_C_nn EQU 0xDA
|
||||
OR_n EQU 0xF6 ; skip next byte op, set flags
|
||||
CP_n EQU 0xFE ; skip next byte op, set flags
|
||||
CALL_nn EQU 0xCD
|
||||
|
||||
; --------------------------------------------------
|
||||
; Other constants
|
||||
; --------------------------------------------------
|
||||
CONS1 EQU 0x88 ; 136
|
||||
CON1 EQU 0x2c20
|
||||
NMLOFS EQU 6
|
||||
NMREL EQU 3
|
||||
MAXPRM EQU 32 ; 0x20
|
||||
READYR_ADDR EQU 0x0002
|
||||
|
||||
WHILSIZ EQU 0x1A ; Memory size to store "WHILE" loop data
|
||||
FORSIZ EQU 0x18 ; Memory size to store "FOR" loop data
|
||||
|
||||
DATA_FLG EQU 0x02
|
||||
REM_FLG EQU 0x04
|
||||
NMLO.C EQU 8
|
||||
CLMWID EQU 14 ; Comma columns
|
||||
LINLN EQU 40 ; Terminal line length
|
||||
PRMSIZ EQU 100 ; Definition block size
|
||||
NUMLEV EQU 60 ; Number of stack levels reserved
|
||||
|
||||
VRAMAD EQU 0xF000 ; Alphatronics VRAM address
|
||||
@@ -0,0 +1,141 @@
|
||||
; ==================================================
|
||||
; Microsoft Basic-80 v5.26, for CP/M OS, for Triumph
|
||||
; Adler Alphatronic PC.
|
||||
;
|
||||
; BASIC error messages and their codes
|
||||
; Disassembled by Romychs @ 2026-09-16
|
||||
; ==================================================
|
||||
|
||||
; --------------------------------------------------
|
||||
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
|
||||
MSG_OVR_ERR:
|
||||
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
|
||||
MSG_DBZ_ERR:
|
||||
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
|
||||
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
|
||||
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
|
||||
ERRDOF EQU 0x48 ; 73 Disk offline
|
||||
ERRFWP EQU 0x49 ; 72 File protected
|
||||
|
||||
; --------------------------------------------------
|
||||
LSTERR EQU ERRFWP + 1
|
||||
@@ -0,0 +1,100 @@
|
||||
; ==================================================
|
||||
; Microsoft Basic-80 v5.26, for CP/M OS, for Triumph
|
||||
; Adler Alphatronic PC.
|
||||
;
|
||||
; IO Ports
|
||||
; Disassembled by Romychs @ 2026-09-28
|
||||
; ==================================================
|
||||
|
||||
|
||||
AL_PORT_00 EQU 0x00
|
||||
; --------------------------------------------------
|
||||
; In:
|
||||
; bit 0 - FDC ready
|
||||
; bit 1 - Videocard accessible
|
||||
; bit 2..4 - codepage (000 -International)
|
||||
; bit 5 - LPT ON
|
||||
; bit 6 - is NTSC
|
||||
; bit 7 - is VSYNC
|
||||
;
|
||||
; Out:
|
||||
; bit 0 - 0 40x24, 1 - 80x24 vmode
|
||||
; bit 1 - screeen off/on
|
||||
; bit 2 - 0 - centronics, 1 - v.24 interface
|
||||
; bit 3 - cassete motor off/on
|
||||
; bit 4 - beeper off/on
|
||||
; bit 5 - always 0
|
||||
; bit 6 - ROM-pack off/on
|
||||
; bit 7 - 0 - ROM, 1 - RAM 64K
|
||||
; --------------------------------------------------
|
||||
MON_SPORT: EQU 0x10
|
||||
|
||||
; Keyboard key status:
|
||||
; Inp: bit 0 - Key "0" .. bit 7 Key "7"
|
||||
; out: Monitor ROM, CRT controller and printer
|
||||
MON_SPORT2 EQU 0x20
|
||||
MON_KBPORT EQU MON_SPORT2
|
||||
|
||||
; Keyboard key status:
|
||||
; bit 1 - 8
|
||||
; bit 2 - 9
|
||||
; bit 3 - .
|
||||
; bit 4 - -
|
||||
; bit 5 - =
|
||||
; bit 6 - +
|
||||
AL_KBD_X1: EQU 0x21
|
||||
AL_KBD_X2: EQU 0x22
|
||||
AL_KBD_X3: EQU 0x23
|
||||
AL_KBD_X4: EQU 0x24
|
||||
AL_KBD_X5: EQU 0x25
|
||||
AL_KBD_X6: EQU 0x26
|
||||
AL_KBS_X7: EQU 0x27
|
||||
AL_KBD_X8: EQU 0x28
|
||||
AL_KBD_X9: EQU 0x29
|
||||
|
||||
; Keyboard key status:
|
||||
; bit 0
|
||||
; bit 1 - INS/DEL
|
||||
; bit 2 - Shift
|
||||
; bit 3 - Tab
|
||||
; bit 4 - Enter
|
||||
; bit 5 - Graph
|
||||
; bit 6 - Clear home
|
||||
; bit 7 - ESC
|
||||
AL_KBD_XA EQU 0x2A
|
||||
AL_KBD_XB EQU 0x2B
|
||||
|
||||
; Centronix data output
|
||||
AL_CENT_DO EQU 0x30
|
||||
|
||||
AL_PORT_33 EQU 0x33
|
||||
|
||||
; Usart DI/DO port for Cassete
|
||||
AL_CASS_ADDR EQU 0x40
|
||||
|
||||
; Usart DI/DO port for Cassete control
|
||||
AL_CASS_DATA EQU 0x41
|
||||
|
||||
; CRTC - HD46505 / HD6845SP Address
|
||||
AL_CRTC_ADDR EQU 0x50
|
||||
CRTPT0 EQU AL_CRTC_ADDR
|
||||
|
||||
; CRTC - HD46505 / HD6845SP Data
|
||||
AL_CRTC_DATA EQU 0x51
|
||||
; 8257 DMAC
|
||||
AL_DMAC_64 EQU 0x64
|
||||
|
||||
; 8257 DMAC
|
||||
AL_DMAC_65 EQU 0x65
|
||||
; 8257 DMAC
|
||||
AL_DMAC_68 EQU 0x68
|
||||
|
||||
; Programable interrupt controller port 0
|
||||
PIC70 EQU 0x70
|
||||
; Programable interrupt controller port 1
|
||||
PIC71 EQU 0x71
|
||||
|
||||
; Floppy fisk controller ports
|
||||
AL_FDD_F0 EQU 0xF0
|
||||
FDCDT EQU 0xF8
|
||||
FDCST EQU 0xF9
|
||||
+6340
File diff suppressed because it is too large.
Load diff
+9122
File diff suppressed because it is too large.
Load diff
+3899
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,75 @@
|
||||
; ===================================================
|
||||
; Microsoft Basic-80 v5.26, for CP/M OS, for Triumph
|
||||
; Adler Alphatronic PC.
|
||||
;
|
||||
; Main source file
|
||||
; Disassembled by Romychs @ 2026-09-16
|
||||
; ===================================================
|
||||
|
||||
DEVICE NOSLOT64K
|
||||
SLDOPT COMMENT WPMEM, ASSERTION, LOGPOINT
|
||||
|
||||
INCLUDE "equates.inc"
|
||||
INCLUDE "ioports.inc"
|
||||
INCLUDE "monitor.inc"
|
||||
|
||||
;LABELSLIST "mb.label"
|
||||
OUTPUT mb.com
|
||||
|
||||
ORG 0x0000
|
||||
|
||||
; ---------------------------------------------------
|
||||
; Computer startup entry and common BASIC routines
|
||||
; ---------------------------------------------------
|
||||
|
||||
INCLUDE "startup.inc"
|
||||
|
||||
; ---------------------------------------------------
|
||||
; Operator, statement, function dispatcher tables
|
||||
; ---------------------------------------------------
|
||||
|
||||
INCLUDE "disptab.inc"
|
||||
|
||||
; ---------------------------------------------------
|
||||
; Errors
|
||||
; ---------------------------------------------------
|
||||
|
||||
INCLUDE "errors.inc"
|
||||
|
||||
; ---------------------------------------------------
|
||||
; Initialized variables
|
||||
; ---------------------------------------------------
|
||||
|
||||
INCLUDE "variables.inc"
|
||||
|
||||
; ---------------------------------------------------
|
||||
; Main code implimentation
|
||||
; ---------------------------------------------------
|
||||
|
||||
INCLUDE "main1.inc"
|
||||
|
||||
; ---------------------------------------------------
|
||||
; String subroutines
|
||||
; ---------------------------------------------------
|
||||
|
||||
INCLUDE "string.inc"
|
||||
|
||||
; ---------------------------------------------------
|
||||
; Math subroutines
|
||||
; ---------------------------------------------------
|
||||
|
||||
INCLUDE "math.inc"
|
||||
|
||||
; ---------------------------------------------------
|
||||
; Main code implimentation, continue
|
||||
; ---------------------------------------------------
|
||||
|
||||
INCLUDE "main2.inc"
|
||||
|
||||
; ---------------------------------------------------
|
||||
; Stack
|
||||
; ---------------------------------------------------
|
||||
|
||||
MB_TSTACK EQU $ + 70
|
||||
|
||||
; ===================================================
|
||||
+3384
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,454 @@
|
||||
; ==================================================
|
||||
; Microsoft Basic-80 v5.26, for CP/M OS, for Triumph
|
||||
; Adler Alphatronic PC.
|
||||
;
|
||||
; MONITOR Symbols
|
||||
; Disassembled by Romychs @ 2026-09-28
|
||||
; ==================================================
|
||||
|
||||
|
||||
|
||||
MODULE MON
|
||||
|
||||
ACONS0 EQU 0xf130
|
||||
ACONST EQU 0xf115
|
||||
ADRGET EQU 0xe9b7
|
||||
ADROT EQU 0xe2dc
|
||||
ALCONS EQU 0xe45d
|
||||
ANLY1 EQU 0xe68c
|
||||
ANLY10 EQU 0xe6e7
|
||||
ANLY2 EQU 0xe696
|
||||
ANLY3 EQU 0xe69d
|
||||
ANLY4 EQU 0xe6a0
|
||||
ANLY5 EQU 0xe6a8
|
||||
ANLY6 EQU 0xe6ae
|
||||
ANLY7 EQU 0xe6c3
|
||||
ATRCLA EQU 0xe9ed
|
||||
BASFLG EQU 0xe4d0
|
||||
BASIN1 EQU 0xef81
|
||||
BASINT EQU 0xef74
|
||||
BATIN EQU 0xe418
|
||||
BATOUT EQU 0xe41b
|
||||
BATST EQU 0xe415
|
||||
BEEP EQU 0xea7e
|
||||
BEEP0 EQU 0xe454
|
||||
BEEP1 EQU 0xe457
|
||||
BEEPOF EQU 0xea9e
|
||||
BEEPON EQU 0xea96
|
||||
BKYTS1 EQU 0xeadd
|
||||
BLNKI0 EQU 0xee04
|
||||
BLNKINS EQU 0xedfc
|
||||
BP0 EQU 0xea8f
|
||||
BP1 EQU 0xea91
|
||||
BREAK EQU 0xe1ea
|
||||
BRKADR EQU 0xe1e8
|
||||
BRKCMD EQU 0xe1e7
|
||||
BRKEY EQU 0xe891
|
||||
BRKPNT EQU 0xe45a
|
||||
BRKPT EQU 0xe4b7
|
||||
BRKYTS EQU 0xeaa4
|
||||
BSCRED EQU 0xe925
|
||||
BUF EQU 0xe4a6
|
||||
BUFC0 EQU 0xe2d5
|
||||
BUFCLR EQU 0xe2d0
|
||||
BUFOT EQU 0xe2a7
|
||||
CAP1 EQU 0xf13a
|
||||
CAP2 EQU 0xf142
|
||||
CAP3 EQU 0xf145
|
||||
CAP4 EQU 0xf148
|
||||
CAP5 EQU 0xf14b
|
||||
CAP6 EQU 0xf14e
|
||||
CAP7 EQU 0xf151
|
||||
CAPLCK EQU 0xe6ec
|
||||
CAPLMP EQU 0xe8bf
|
||||
CATADR EQU 0xe492
|
||||
CBCKSP EQU 0xea74
|
||||
CCHA EQU 0xe466
|
||||
CCHADR EQU 0xe490
|
||||
CCLUMN EQU 0xe46e
|
||||
CCNTW EQU 0xe494
|
||||
CCR EQU 0xe909
|
||||
CCR0 EQU 0xe915
|
||||
CCR1 EQU 0xe91b
|
||||
CDCHA EQU 0xe8ec
|
||||
CDCHK0 EQU 0xec2a
|
||||
CDCNV0 EQU 0xe739
|
||||
CDCOL EQU 0xec83
|
||||
CDCONV EQU 0xe72c
|
||||
CDCTL EQU 0xe84c
|
||||
CEFNC EQU 0xe6f6
|
||||
CESCFL EQU 0xe48c
|
||||
CGCNT EQU 0xe497
|
||||
CHG2 EQU 0xe0db
|
||||
CHG3 EQU 0xe0e3
|
||||
CHG4 EQU 0xe0ec
|
||||
CHRCOL EQU 0xec34
|
||||
CLINE EQU 0xe46d
|
||||
CLMCL EQU 0xe947
|
||||
CLMSET EQU 0xe92e
|
||||
CLNCL EQU 0xedcf
|
||||
CLSCOL EQU 0xec64
|
||||
CLUMBF EQU 0xe4ca
|
||||
CLUMSZ EQU 0xe462
|
||||
CMCHK EQU 0xe2e3
|
||||
CMTOUT EQU 0xeae3
|
||||
CODECH EQU 0xec1f
|
||||
COLBK0 EQU 0xec4e
|
||||
COLFLG EQU 0xe499
|
||||
CONCCL EQU 0xe44b
|
||||
CONFLG EQU 0xe46a
|
||||
CONSMD EQU 0xece1
|
||||
CONWCL EQU 0xe44e
|
||||
CP_N1 EQU 0xe750
|
||||
CPATR EQU 0xe467
|
||||
CPCHA EQU 0xe46c
|
||||
CRCHK EQU 0xe880
|
||||
CRLFOT EQU 0xe3c3
|
||||
CRLSOT EQU 0xe3d5
|
||||
CRT424 EQU 0xee88
|
||||
CRT824 EQU 0xee90
|
||||
CRTCK EQU 0xe7cc
|
||||
CRTIN EQU 0xe40f
|
||||
CRTNUS EQU 0xea0f
|
||||
CRTON EQU 0xeec9
|
||||
CRTOST EQU 0xe442
|
||||
CRTOT EQU 0xe7ac
|
||||
CRTOT0 EQU 0xe7d8
|
||||
CRTOT1 EQU 0xe7dc
|
||||
CRTOT2 EQU 0xe7e7
|
||||
CRTOT3 EQU 0xe7ef
|
||||
CRTOT4 EQU 0xe808
|
||||
CRTOTE EQU 0xe7df
|
||||
CRTOUT EQU 0xe412
|
||||
CRTST EQU 0xe40c
|
||||
CRTUS0 EQU 0xea21
|
||||
CRTUSE EQU 0xea1c
|
||||
CRTVOF EQU 0xea09
|
||||
CRTVON EQU 0xea16
|
||||
CRTVRS EQU 0xf06d
|
||||
CTINTL EQU 0xeb1d
|
||||
CTLFNC EQU 0xe81e
|
||||
CTLTB0 EQU 0xe867
|
||||
CTLTBL EQU 0xe855
|
||||
CTOTM EQU 0xe4da
|
||||
CTRCN0 EQU 0xe729
|
||||
CTRCNV EQU 0xe71a
|
||||
CTRLF EQU 0xe6d4
|
||||
CTRLFN EQU 0xe83f
|
||||
CTRW0 EQU 0xea28
|
||||
CTRW1 EQU 0xea2e
|
||||
CTRWTM EQU 0xea27
|
||||
CTSET EQU 0xee96
|
||||
CTSET1 EQU 0xeeb5
|
||||
CTVOFF EQU 0xe4d4
|
||||
CTVON EQU 0xe4d7
|
||||
CURADR EQU 0xe49a
|
||||
CURADV EQU 0xe8fa
|
||||
CURPNT EQU 0xe9cc
|
||||
CURS1 EQU 0xec93
|
||||
CURS2 EQU 0xea6f
|
||||
CURSCL EQU 0xe9ff
|
||||
CURSD EQU 0xea5f
|
||||
CURSD1 EQU 0xea69
|
||||
CURSD2 EQU 0xea6c
|
||||
CURSET EQU 0xe931
|
||||
CURSFL EQU 0xe470
|
||||
CURSL EQU 0xea35
|
||||
CURSOF EQU 0xec91
|
||||
CURSON EQU 0xec8d
|
||||
CURSR EQU 0xea50
|
||||
CURSRD EQU 0xeca6
|
||||
CURSU EQU 0xea44
|
||||
CURSY EQU 0xe496
|
||||
CURXS1 EQU 0xed65
|
||||
CURXS2 EQU 0xed49
|
||||
CURXS3 EQU 0xed52
|
||||
CURXS4 EQU 0xed5e
|
||||
CURXS5 EQU 0xed61
|
||||
CURYS0 EQU 0xed1b
|
||||
CURYS1 EQU 0xed35
|
||||
CURYS2 EQU 0xed28
|
||||
CURYS3 EQU 0xed2e
|
||||
CURYS4 EQU 0xed31
|
||||
DEDATA EQU 0xe4cc
|
||||
DELAY EQU 0xe451
|
||||
DELCH0 EQU 0xedeb
|
||||
DELCH1 EQU 0xedf6
|
||||
DELCHAR EQU 0xede7
|
||||
DELKY EQU 0xe897
|
||||
DEPUT EQU 0xe80d
|
||||
DERGFL EQU 0xe4cb
|
||||
DISPCL EQU 0xe9e8
|
||||
DLY EQU 0xe67b
|
||||
DMP1 EQU 0xe19c
|
||||
DMP2 EQU 0xe1a9
|
||||
DUMP EQU 0xe178
|
||||
EDSCRL EQU 0xe963
|
||||
EROL EQU 0xed99
|
||||
EROS EQU 0xeddd
|
||||
ESCAP EQU 0xebe3
|
||||
ESCAP1 EQU 0xec03
|
||||
ESCAP2 EQU 0xec10
|
||||
ESCCN1 EQU 0xec13
|
||||
ESCCN1_1 EQU 0xec14
|
||||
ESCFNC EQU 0xe823
|
||||
ESCN2 EQU 0xec18
|
||||
ESCTB1 EQU 0xeb51
|
||||
ESCTB2 EQU 0xebac
|
||||
EXT0 EQU 0xe27d
|
||||
EXTMON EQU 0xe270
|
||||
F0 EQU 0xedc9
|
||||
FDTBL EQU 0xf08b
|
||||
FILLM EQU 0xedba
|
||||
FKDSPF EQU 0xe46b
|
||||
FOT0 EQU 0xe2b6
|
||||
FOT1 EQU 0xe2c1
|
||||
FOT2 EQU 0xe2c3
|
||||
GHG0 EQU 0xe0cd
|
||||
GHG1 EQU 0xe0d0
|
||||
GLC EQU 0xe8d6
|
||||
GLC0 EQU 0xe8e5
|
||||
GLCOF EQU 0xe8e8
|
||||
GLCSET EQU 0xe8ab
|
||||
GLMPOF EQU 0xe8bb
|
||||
GOTO EQU 0xe1c9
|
||||
GRCON0 EQU 0xe835
|
||||
GRCON1 EQU 0xe83c
|
||||
GRCONV EQU 0xe828
|
||||
GRFLG EQU 0xe4c8
|
||||
GRFSET EQU 0xe817
|
||||
GRLCK EQU 0xe6ff
|
||||
GRMOD EQU 0xeced
|
||||
GRMOD0 EQU 0xecf1
|
||||
GRMOD1 EQU 0xed07
|
||||
HTOA EQU 0xe39c
|
||||
HX2IN EQU 0xe3e0
|
||||
HX4OT EQU 0xe393
|
||||
HX4OT0 EQU 0xe398
|
||||
HXDA EQU 0xe49c
|
||||
HXDB EQU 0xe49e
|
||||
HXDC EQU 0xe4a0
|
||||
HXDD EQU 0xe4a2
|
||||
HXDE EQU 0xe4a4
|
||||
HXIN0 EQU 0xef5b
|
||||
HXIN1 EQU 0xef68
|
||||
HXNIN EQU 0xef53
|
||||
HXO0 EQU 0xe3ba
|
||||
HXO1 EQU 0xe3bf
|
||||
HXO_1 EQU 0xe3bb
|
||||
HXOT EQU 0xe3b2
|
||||
IN0 EQU 0xef4b
|
||||
IN1 EQU 0xef4d
|
||||
IN2 EQU 0xef51
|
||||
INITL1 EQU 0xe59d
|
||||
INITL2 EQU 0xe5a3
|
||||
INPUT EQU 0xef34
|
||||
INSKY EQU 0xe894
|
||||
INT0 EQU 0xef00
|
||||
INT1 EQU 0xef04
|
||||
INT2 EQU 0xef08
|
||||
INT3 EQU 0xef0c
|
||||
INT4 EQU 0xef10
|
||||
INT5 EQU 0xef14
|
||||
INT6 EQU 0xef18
|
||||
INT7 EQU 0xef1c
|
||||
INVOF EQU 0xe89a
|
||||
INVON EQU 0xe8a0
|
||||
IPL2 EQU 0xf0dc
|
||||
IPL3 EQU 0xf0e5
|
||||
IPL4 EQU 0xf0fa
|
||||
IPL5 EQU 0xf10c
|
||||
IPLAD EQU 0xc200
|
||||
IPLDSK EQU 0xef98
|
||||
IPLST EQU 0xf0b2
|
||||
IPLST1 EQU 0xefa6
|
||||
KBDST EQU 0xe48a
|
||||
KBIN EQU 0xe5e7
|
||||
KBIN1 EQU 0xe5fe
|
||||
KBIN10 EQU 0xe664
|
||||
KBIN11 EQU 0xe66a
|
||||
KBIN2 EQU 0xe609
|
||||
KBIN3 EQU 0xe641
|
||||
KBIN4 EQU 0xe647
|
||||
KBIN5 EQU 0xe64b
|
||||
KBIN6 EQU 0xe64f
|
||||
KBIN7 EQU 0xe653
|
||||
KBIN8 EQU 0xe656
|
||||
KBIN9 EQU 0xe65f
|
||||
KCFL EQU 0xe48b
|
||||
KEYIN EQU 0xe762
|
||||
KEYIND EQU 0xe3f2
|
||||
KEYSCAN EQU 0xe66e
|
||||
KEYST EQU 0xe5b1
|
||||
KEYST1 EQU 0xe5ca
|
||||
KEYST2 EQU 0xe5d5
|
||||
KEYST3 EQU 0xe5e1
|
||||
KEYST4 EQU 0xe5e3
|
||||
KEYVR0 EQU 0xf05e
|
||||
KEYVRS EQU 0xf02c
|
||||
KINCHA EQU 0xe48f
|
||||
KINPCH EQU 0xe498
|
||||
KNTBL EQU 0xe47e
|
||||
KONSU EQU 0xe48d
|
||||
KREPFL EQU 0xe471
|
||||
KSADR EQU 0xe48e
|
||||
KYANLY EQU 0xe682
|
||||
KYIN0 EQU 0xe765
|
||||
KYIN1 EQU 0xe77a
|
||||
KYIN2 EQU 0xe794
|
||||
KYIN3 EQU 0xe799
|
||||
KYIN4 EQU 0xe7a2
|
||||
KYIN5 EQU 0xe7a8
|
||||
KYSCN1 EQU 0xe672
|
||||
LCKCHK EQU 0xe70f
|
||||
LCKHLD EQU 0xe4c9
|
||||
LCKYFL EQU 0xe46f
|
||||
LEDCL0 EQU 0xed9b
|
||||
LEDCL1 EQU 0xed9e
|
||||
LEDCL2 EQU 0xeda3
|
||||
LINEOT EQU 0xef6a
|
||||
LINESZ EQU 0xe461
|
||||
LINSZ1 EQU 0xe460
|
||||
LMPOUT EQU 0xe8b7
|
||||
LNCNT EQU 0xe9de
|
||||
LNCNT0 EQU 0xe9e3
|
||||
LPRT0 EQU 0xead6
|
||||
LPRTOT EQU 0xeac2
|
||||
LPRTST EQU 0xeab5
|
||||
LPTOUT EQU 0xe439
|
||||
LPTST EQU 0xe445
|
||||
LSTSEL EQU 0xf020
|
||||
MEMOT EQU 0xe3ab
|
||||
MONTOP EQU 0xe400
|
||||
MOUT EQU 0xe38d
|
||||
MOVE EQU 0xe0f2
|
||||
MSCR0 EQU 0xef2a
|
||||
MSG_AROVR EQU 0xe328
|
||||
MSG_BRK EQU 0xe353
|
||||
MSG_CMPLT EQU 0xe31a
|
||||
MSG_MEMA EQU 0xe30c
|
||||
MSG_PRNOFF EQU 0xe338
|
||||
MSG_PRNON EQU 0xe346
|
||||
MSG_RDUMP EQU 0xe360
|
||||
MSG_VER EQU 0xe2e9
|
||||
MSTART EQU 0xe060
|
||||
MTST0 EQU 0xeb44
|
||||
MTSTOP EQU 0xeb4a
|
||||
MTSTRT EQU 0xeb3f
|
||||
MV1 EQU 0xe14e
|
||||
MV2 EQU 0xe157
|
||||
MV3 EQU 0xe15e
|
||||
MV4 EQU 0xe16c
|
||||
NTSCCN EQU 0xfd40
|
||||
NTSCR0 EQU 0xef20
|
||||
PARABF EQU 0xe4ce
|
||||
PARAT0 EQU 0xee28
|
||||
PICINIT EQU 0xf07e
|
||||
POSC0 EQU 0xeccb
|
||||
POSCAL EQU 0xecc3
|
||||
PRTFLG EQU 0xe4b6
|
||||
PRTSET EQU 0xe257
|
||||
PTPOUT EQU 0xe430
|
||||
PTSET EQU 0xeb39
|
||||
RDCHAR EQU 0xed88
|
||||
RDINT EQU 0xe3fd
|
||||
RDINT0 EQU 0xef91
|
||||
RDMP0 EQU 0xe22e
|
||||
RDSTAT EQU 0xf0a9
|
||||
RDUMP EQU 0xe21d
|
||||
RETADR EQU 0xe1e6
|
||||
RS2S00 EQU 0xeb0d
|
||||
RS2ST EQU 0xeaff
|
||||
RS2ST0 EQU 0xeb08
|
||||
RS2ST1 EQU 0xeb10
|
||||
RSCIN EQU 0xeaf6
|
||||
RSCOT0 EQU 0xeaf2
|
||||
RSCOUT EQU 0xeaec
|
||||
RSINTL EQU 0xeb2c
|
||||
SAAF EQU 0xe4bf
|
||||
SABC EQU 0xe4b9
|
||||
SADE EQU 0xe4bb
|
||||
SAI EQU 0xe4c1
|
||||
SAIX EQU 0xe4c2
|
||||
SAIY EQU 0xe4c4
|
||||
SCREND EQU 0xe922
|
||||
SCRL3 EQU 0xe97d
|
||||
SCRL4 EQU 0xe98c
|
||||
SCRL5 EQU 0xe999
|
||||
SCRLBT EQU 0xe465
|
||||
SCRLST EQU 0xe463
|
||||
SCRLSZ EQU 0xe464
|
||||
SETCM1 EQU 0xf09e
|
||||
SETCM2 EQU 0xf09f
|
||||
SETCMD EQU 0xf099
|
||||
SFF0 EQU 0xe468
|
||||
SFF1 EQU 0xe469
|
||||
SHFTFL EQU 0xe6e2
|
||||
SKTBL EQU 0xe472
|
||||
SLMPOF EQU 0xe8d2
|
||||
SPACE8 EQU 0xf152
|
||||
SPORT EQU 0x10
|
||||
SPORT2 EQU 0x20
|
||||
SPOT EQU 0xe3cd
|
||||
SPOT0 EQU 0xe3d0
|
||||
ST0 EQU 0xe06d
|
||||
ST1 EQU 0xe07f
|
||||
ST10 EQU 0xe089
|
||||
ST2 EQU 0xe08c
|
||||
SV_STK EQU 0xe4c6
|
||||
SVHL EQU 0xe4bd
|
||||
SYSCHK EQU 0xe000
|
||||
SYSINT EQU 0xefc1
|
||||
SYSRES EQU 0xf010
|
||||
TAB0 EQU 0xe299
|
||||
TABOT EQU 0xe282
|
||||
TALPH1 EQU 0xfd94
|
||||
TALPHA EQU 0xfd64
|
||||
TASCL EQU 0xe4dd
|
||||
TASCU EQU 0xe53d
|
||||
TBL1 EQU 0xeecf
|
||||
TBL2 EQU 0xeee1
|
||||
TBLCTL EQU 0xe525
|
||||
TBLCTU EQU 0xe585
|
||||
TBLEX EQU 0xf064
|
||||
TBLFRN EQU 0xf980
|
||||
TBLI6 EQU 0xfbc0
|
||||
TBLI7 EQU 0xfc80
|
||||
TBLITA EQU 0xfb00
|
||||
TBLUK EQU 0xfa40
|
||||
TBLUSA EQU 0xf8c0
|
||||
TMC0 EQU 0xe4d2
|
||||
TTOST EQU 0xe43f
|
||||
TTYIN EQU 0xe406
|
||||
TTYOUT EQU 0xe409
|
||||
TTYST EQU 0xe403
|
||||
USCNIN EQU 0xe421
|
||||
USCNOT EQU 0xe424
|
||||
USCNST EQU 0xe41e
|
||||
USL1OT EQU 0xe43c
|
||||
USL1ST EQU 0xe448
|
||||
USP1OT EQU 0xe433
|
||||
USP2OT EQU 0xe436
|
||||
USR1IN EQU 0xe42a
|
||||
USR2IN EQU 0xe42d
|
||||
USRKB0 EQU 0xecd6
|
||||
USRLBD EQU 0xecd1
|
||||
WCHAXX EQU 0xee68
|
||||
WDSCRL EQU 0xe94a
|
||||
WRBLK0 EQU 0xee32
|
||||
WRBLK1 EQU 0xee3c
|
||||
WRBLK2 EQU 0xee45
|
||||
WRBLK3 EQU 0xee48
|
||||
WRBLK4 EQU 0xee4c
|
||||
WRBLK5 EQU 0xee5b
|
||||
WRBLKX EQU 0xee2a
|
||||
WRCHA0 EQU 0xed73
|
||||
WRCHAR EQU 0xed6a
|
||||
WRCHRAX EQU 0xee5f
|
||||
WREDAD EQU 0xe4d1
|
||||
WSCRL1 EQU 0xe95d
|
||||
WSCRL2 EQU 0xe961
|
||||
XCRTC EQU 0xee75
|
||||
XCRTC_3 EQU 0xee78
|
||||
|
||||
ENDMODULE
|
||||
@@ -0,0 +1,82 @@
|
||||
; ==================================================
|
||||
; MONITOR program for Triumph Adler Alphatronic PC.
|
||||
;
|
||||
; Computer startup entry and common BASIC routines
|
||||
; Disassembled by Romychs @ 2026-09-28
|
||||
; ==================================================
|
||||
|
||||
|
||||
; ---------------------------------------------------
|
||||
; Restart entry point
|
||||
; ---------------------------------------------------
|
||||
RST0:
|
||||
JP MB_INIT
|
||||
RET
|
||||
LD A ,(0xf3c3)
|
||||
INC C
|
||||
|
||||
; ---------------------------------------------------
|
||||
; SYNCHR
|
||||
; ---------------------------------------------------
|
||||
SYNCHR:
|
||||
LD A ,(HL)
|
||||
EX (SP) ,HL
|
||||
CP (HL)
|
||||
INC HL
|
||||
EX (SP) ,HL
|
||||
JP NZ ,MB_SNERR
|
||||
|
||||
; ---------------------------------------------------
|
||||
; CHRGTR
|
||||
; ---------------------------------------------------
|
||||
CHRGTR:
|
||||
INC HL
|
||||
LD A ,(HL)
|
||||
CP ':'
|
||||
RET NC
|
||||
JP MB_CHRCON
|
||||
|
||||
; ---------------------------------------------------
|
||||
; OUTDO
|
||||
; ---------------------------------------------------
|
||||
OUTDO:
|
||||
PUSH AF
|
||||
JP MB_OUTDO
|
||||
.4 db 0
|
||||
|
||||
; ---------------------------------------------------
|
||||
; MB_DCOMPR
|
||||
; ---------------------------------------------------
|
||||
DCOMPR:
|
||||
LD A ,H
|
||||
SUB D
|
||||
RET NZ
|
||||
LD A ,L
|
||||
SUB E
|
||||
RET
|
||||
DB 1
|
||||
|
||||
; ---------------------------------------------------
|
||||
MB_TTYPOS:
|
||||
DB 0
|
||||
|
||||
; ---------------------------------------------------
|
||||
; MB_SIGN
|
||||
; ---------------------------------------------------
|
||||
SIGN:
|
||||
LD A ,(MB_DACC)
|
||||
OR A
|
||||
JP NZ ,MB_SIGN1
|
||||
RET
|
||||
|
||||
; ---------------------------------------------------
|
||||
; MB_GETYPR
|
||||
; ---------------------------------------------------
|
||||
GETYPTR:
|
||||
LD A ,(MB_VALTYP) ;MB_GETYPR
|
||||
CP TDBL
|
||||
JP MB_GETYPR
|
||||
|
||||
; ---------------------------------------------------
|
||||
START:
|
||||
JP MON.BRKPNT
|
||||
+1016
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,351 @@
|
||||
; ===================================================
|
||||
; Microsoft Basic-80 v5.26, for CP/M OS, for Triumph
|
||||
; Adler Alphatronic PC.
|
||||
;
|
||||
; Initialized Variables
|
||||
; Disassembled by Romychs @ 2026-09-28
|
||||
; ===================================================
|
||||
|
||||
; ---------------------------------------------------
|
||||
; User function table
|
||||
; ---------------------------------------------------
|
||||
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_NULCNT:
|
||||
DB 0
|
||||
MB_ERRFLG:
|
||||
DB 0
|
||||
DB 0
|
||||
MB_LPTPOS:
|
||||
DB 0
|
||||
MB_PRTFLG:
|
||||
DB 0
|
||||
MB_NLPPOS:
|
||||
DB 238
|
||||
MB_LPTSIZ:
|
||||
DB 255
|
||||
MB_LINLEN:
|
||||
DB LINLN
|
||||
MB_CLMLST:
|
||||
DB 0xE
|
||||
DB 0x00
|
||||
|
||||
; ---------------------------------------------------
|
||||
; Stack pointer
|
||||
; ---------------------------------------------------
|
||||
MB_TOPMEM:
|
||||
DW MB_TSTACK + 100
|
||||
MB_CURLIN:
|
||||
DW 0xFFFE
|
||||
|
||||
; ---------------------------------------------------
|
||||
; Start of BASIC program text
|
||||
; ---------------------------------------------------
|
||||
MB_TXTTAB:
|
||||
DW 0x733F
|
||||
|
||||
; Temp pointer to error message string (OVERR/DBZ handlers)
|
||||
MB_ERRMSG_PTR:
|
||||
DW 0x488
|
||||
|
||||
AL_VAR1:
|
||||
DB 0
|
||||
|
||||
; Saved color value, restored on CONSOLE exit
|
||||
MB_COLOR_SAVED:
|
||||
DW 0x7
|
||||
|
||||
AL_SCRN_ROWS:
|
||||
DB 24
|
||||
|
||||
; Current input cursor position (col,row), used as word
|
||||
MB_CURPOS:
|
||||
DB 1
|
||||
|
||||
MB_COUT_FL:
|
||||
DB 1
|
||||
|
||||
MB_ENDPRG:
|
||||
DB ':'
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
|
||||
MB_NAMCNT:
|
||||
DB 0
|
||||
|
||||
; Name buffer
|
||||
MB_NAMBUF:
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
DB 0
|
||||
|
||||
MB_NAMBUF_END:
|
||||
DB 0
|
||||
|
||||
MB_NAMTMP:
|
||||
DW 0
|
||||
|
||||
MB_RST_INP:
|
||||
DB ':'
|
||||
|
||||
; Buffer to store user input from keyboard
|
||||
MB_KBUF:
|
||||
.318 DB 0
|
||||
|
||||
; Length of buffer above
|
||||
KBFLEN EQU $ - MB_KBUF
|
||||
|
||||
|
||||
MB_BUFMIN:
|
||||
DB 0x2C
|
||||
MB_BUF:
|
||||
.258 DB 0
|
||||
|
||||
MB_ENDBUF:
|
||||
DB 0
|
||||
MB_DIMFLG:
|
||||
DB 0
|
||||
MB_VALTYP:
|
||||
DB 0
|
||||
MB_OPRTYP:
|
||||
DB 0
|
||||
MB_DORES:
|
||||
DB 0
|
||||
MB_CONTXT:
|
||||
DW 0
|
||||
MB_CONSAV:
|
||||
DB 0
|
||||
MB_CONTYP:
|
||||
DB 0
|
||||
MB_CONLO:
|
||||
.4 DW 0
|
||||
|
||||
; ---------------------------------------------------
|
||||
; Last address available for BASIC program
|
||||
; ---------------------------------------------------
|
||||
MB_MEMSIZ:
|
||||
DW 0
|
||||
|
||||
MB_TEMPPT:
|
||||
DW 0
|
||||
|
||||
MB_TEMPST:
|
||||
.15 DB 0
|
||||
|
||||
MB_TEMPST_1:
|
||||
.15 DB 0
|
||||
|
||||
MB_DSCTMP:
|
||||
.3 DB 0
|
||||
|
||||
MB_FRETOP:
|
||||
DW 0
|
||||
MB_TEMP3:
|
||||
DW 0
|
||||
MB_CPMFIL:
|
||||
DW 0
|
||||
MB_ENDFOR:
|
||||
DW 0
|
||||
MB_DATLIN:
|
||||
DW 0
|
||||
MB_SUBFLG:
|
||||
DB 0
|
||||
MB_USFLG:
|
||||
DB 0
|
||||
MB_TEMP:
|
||||
DW 0
|
||||
MB_PTRFLG:
|
||||
DB 0
|
||||
MB_AUTFLG:
|
||||
DB 0
|
||||
MB_AUTLIN:
|
||||
DW 0
|
||||
MB_AUTINC:
|
||||
DW 0
|
||||
MB_SAVTXT:
|
||||
DW 0
|
||||
MB_SAVSTK:
|
||||
DW 0
|
||||
MB_ERRLIN:
|
||||
DW 0
|
||||
MB_DOT:
|
||||
DW 0
|
||||
MB_ERRTXT:
|
||||
DW 0
|
||||
MB_ONELIN:
|
||||
DW 0
|
||||
MB_ONEFLG:
|
||||
DB 0
|
||||
MB_TEMP2:
|
||||
DW 0
|
||||
MB_OLDLIN:
|
||||
DW 0
|
||||
MB_OLDTXT:
|
||||
DW 0
|
||||
|
||||
; Points to end of program text
|
||||
MB_VARTAB:
|
||||
DW 0
|
||||
|
||||
; Start of variables
|
||||
MB_ARYTAB:
|
||||
DW 0
|
||||
|
||||
; End of variables
|
||||
MB_STREND:
|
||||
DW 0
|
||||
|
||||
MB_DATPTR:
|
||||
DW 0
|
||||
|
||||
MB_DEFTBL:
|
||||
.26 DB 0
|
||||
|
||||
MB_PRMSTK:
|
||||
DW 0
|
||||
MB_PRMLEN:
|
||||
DW 0
|
||||
MB_PARM1:
|
||||
.100 DB 0
|
||||
MB_PRMPRV:
|
||||
DW 0
|
||||
MB_PRMLN2:
|
||||
DW 0
|
||||
|
||||
MB_PARM2:
|
||||
.100 DB 0
|
||||
|
||||
MB_PRMFLG:
|
||||
DB 0
|
||||
MB_ARYTA2:
|
||||
DW 0
|
||||
MB_NOFUNS:
|
||||
DB 0
|
||||
MB_TEMP9:
|
||||
DW 0
|
||||
MB_FUNACT:
|
||||
DW 0
|
||||
MB_INPPAS:
|
||||
DB 0
|
||||
MB_NXTTXT:
|
||||
DW 0
|
||||
MB_NXTFLG:
|
||||
DB 0
|
||||
MB_FVALSV:
|
||||
.4 DW 0
|
||||
MB_NXTLIN:
|
||||
DW 0
|
||||
MB_OPTVAL:
|
||||
DB 0
|
||||
MB_OPTFLAG_1:
|
||||
DB 0
|
||||
MB_OPTVAL_2:
|
||||
DB 0
|
||||
MB_OPTFLAG_2:
|
||||
DB 0
|
||||
MB_PATCH:
|
||||
.30 DB 0
|
||||
MB_TEMPA:
|
||||
DW 0
|
||||
MB_SAVFRE:
|
||||
DW 0
|
||||
MB_MRGFLG:
|
||||
DB 0
|
||||
MB_MDLFLG:
|
||||
DB 0
|
||||
MB_CMEPTR:
|
||||
DW 0
|
||||
MB_CMSPTR:
|
||||
DW 0
|
||||
MB_CHNFLG:
|
||||
DB 0
|
||||
MB_CHNLIN:
|
||||
DW 0
|
||||
MB_SWPTMP:
|
||||
.4 DW 0
|
||||
|
||||
MB_TRCFLG:
|
||||
DB 0
|
||||
|
||||
; --------------------------------------------------
|
||||
; RAM temporary area for Math package routines
|
||||
; --------------------------------------------------
|
||||
MB_FLGOVC:
|
||||
DB 0
|
||||
MB_OVCSTR:
|
||||
DB 0
|
||||
MB_OVCSTR_1:
|
||||
DB 0, 0
|
||||
MB_FBUFFR:
|
||||
.43 DB 0
|
||||
|
||||
MB_DECTMP:
|
||||
DW 0
|
||||
MB_DECTM2:
|
||||
DW 0
|
||||
MB_DECCNT:
|
||||
DW 0
|
||||
MB_DACC:
|
||||
.16 DB 0
|
||||
MB_HOLD8:
|
||||
.65 DB 0
|
||||
|
||||
MB_ARG:
|
||||
.16 DB 0
|
||||
|
||||
MB_RNDX:
|
||||
.8 DB 0
|
||||
|
||||
MB_INTXT:
|
||||
DB " in ", 0
|
||||
MB_OKTXT:
|
||||
DB "Ok\r\n", 0
|
||||
MB_BRKTXT:
|
||||
DB "Break", 0
|
||||
Reference in new issue
Block a user