63 lines
2.8 KiB
PHP
63 lines
2.8 KiB
PHP
; ===================================================
|
|
; MSX BASIC for Orion-128
|
|
;
|
|
; 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)
|
|
|
|
|
|
; --------------------------------------------------
|
|
; 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
|
|
|
|
KBFLEN EQU 0x13E ; 318 |