348 lines
12 KiB
HTML
348 lines
12 KiB
HTML
; ===================================================
|
|
; 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 |