commodore basic 4 routine

245 Views Asked by At

I watched a video on the cbm programming studio. the demo was for hello world using C64 emulator. It makes a call to $AB1E. the memory map for C64 says this Output string: Output string, which is indicated by accu/Y reg, until 0 byte or quote is found.

I looked for a routine like this for the commodore 8032. I don't see it but the memory map may be inaccurate. Does anyone know if there is such a routine for basic4 / cbm 8032? I know there is a routine to print a character, I'm hoping there is one to print a string.

1

There are 1 best solutions below

0
On

According to Programming the PET/CBM (Raeto West) there is a routine in the BASIC Rom at $BB1D which does what you want. This is BASIC 4. The equivalent routine is at $CA1C in BASIC 2 and $CA27 in BASIC 1. He seems to comment that it might be broken in BASIC 4 though and suggests using the routine whose address is at $FFD2 to print a character in combination with the routine at $BB3A (to move the cursor).

$BB1D Print string from memory. From this entry point, if the accumulator A holds the low byte and Y holds the high byte of an address, this routine prints consecutive characters from that location upward until a zero terminator is found. BASIC 4 is reported to insert zero bytes; it may be necessary to write a routine with FFD2 on the lines of this next routine [$BB3A]:

Note that $FFD2 is not where the routine is, it is a vector that holds the real address of the routine.