Calling BASIC from assembly..
Posted: 20 Nov 2024 13:33
how would you call the BASIC interpreter to execute a command from inline assembly ?
something like this ..
10 code
4007 LD HL, Command ; HL points to the BASIC command string
400A CALL #2400 ; Call BASIC interpreter to execute the command
400C RET ; Return to BASIC
400D Command: DB "PRINT "HELLO FROM ASM"", 0
I can't find the EXACT Rom subroutines call address , tried #2400, #2500 and others .. is there a detailed subroutines-documentation for ROM calls somewhere ?!
This is what I was able to find in general:
0x2100 - 0x21FF: Memory management routines, including setting up memory pages and handling memory access.
0x2200 - 0x22FF: Input/output routines, such as reading from the keyboard, writing to the display, and handling disk operations.
0x2300 - 0x23FF: System control routines, including resetting the system, handling interrupts, and managing system resources.
0x2400 - 0x24FF: BASIC interpreter routines, which handle the execution of BASIC programs and commands.
0x2500 - 0x25FF: Assembly language support routines, including machine code execution and interfacing with BASIC.
something like this ..
10 code
4007 LD HL, Command ; HL points to the BASIC command string
400A CALL #2400 ; Call BASIC interpreter to execute the command
400C RET ; Return to BASIC
400D Command: DB "PRINT "HELLO FROM ASM"", 0
I can't find the EXACT Rom subroutines call address , tried #2400, #2500 and others .. is there a detailed subroutines-documentation for ROM calls somewhere ?!
This is what I was able to find in general:
0x2100 - 0x21FF: Memory management routines, including setting up memory pages and handling memory access.
0x2200 - 0x22FF: Input/output routines, such as reading from the keyboard, writing to the display, and handling disk operations.
0x2300 - 0x23FF: System control routines, including resetting the system, handling interrupts, and managing system resources.
0x2400 - 0x24FF: BASIC interpreter routines, which handle the execution of BASIC programs and commands.
0x2500 - 0x25FF: Assembly language support routines, including machine code execution and interfacing with BASIC.