Assembler support - cfx 9850 G

This is schema of access points, whch I have created to enable asm on cfx.

How is machine code executed:

ROM in segment 2 contains table of jums, for every possible token one address, so I changed vector for token "#" from target routine "Syn ERROR" to "PRG START" access point at ROM seg 2:7FF8 , where is changed the segment to RAM. So on the address 7FFA in RAM MUST be instruction of jump to our code. The code should end jumping to 7FF8 where MUST be instruction of change segment to 2 (D1 22) - "EXIT" access point. It points to jump to the routine, which parses comments (token "'") - this solves skipping program arguments.

To read keyboard simply call address 7FF6 where MUST be "GETKEY" access point (instruction of change segment to 3 (D1 23)).

To update display after VIDEO RAM change simply call address 7FF3 where MUST be "DISPLAY" access point (instruction of change segment to 2 (D1 22)).

Return from these routines is done by changing segment to RAM at the address 7FF5, so there MUST be return part for "RET" access point (instruction for return (9F)).

Table of program interface - previous picture as a table
ROM Seg2 ROM Seg3 RAM
7FF3 D1 Cseg D1 Cseg D1 Cseg
7FF4 40 RAM 40 RAM 22 ROM Seg2
7FF5 88 Jump FF Nop 9F Ret
7FF6 FF <Update disp> FF Nop D1 Cseg
7FF7 05 <Update disp> FF Nop 23 ROM Seg3
7FF8 D1 Cseg 8A Call D1 Cseg - Jump here to exit your code
7FF9 40 RAM D0 <Getkey> 22 ROM Seg2
7FFA 88 Jump 74 <Getkey> 88 Jump
7FFB CC <Exit code> 88 Jump <Hi addr of your  code starts>
7FFC C0 <Exit code> 7F <Lo addr of your code starts>
7FFD FF Nop F3 FF (Casio Basic - EOF)
7FFE FF Nop FF Nop '#' (call routine in RAM - executing the file causes running this file as a machine code)
7FFF FF Nop FF Nop ?? - This byte is accessible only via backup send/receive


If you do not want to make your binaries yourself, you can use my compiler (assembler).

Unknown opcodes ? Read this.