mmruzek
Experienced Member
OK, I have been working on this way too long, and can't figure it out... The project started with rewriting Palo Alto Tiny Basic to remove all the INT calls to DOS functions by replacing them with calls to BIOS functions instead. I have that part working. Now I want to write a short assembly language program to relocate the working code from ROM to RAM and execute. The way that I decided to do this is to put a small snippet of code at the first executable ROM address (F600:0000) and have it copy all the Palo Alto Basic program code starting at F600:0100 to a RAM location, for example 0500:0100. The idea is that when the PC does not find DOS, it will trigger INT 18 for the BASIC and instead will find my code and do a relocation and then a far jump to execute.
When I burn a ROM and try this, the Palo Alto program puts garbled text on the screen, and I have determined the welcome message in Palo Alto is being pulled from a memory location that is wrong by about 126 bytes. (?). However, if I boot DOS and go into DEBUG and issue a G=F600:0000 the whole thing works perfectly! Here is one of about 20 coding attempts to do this simple task:
MOV AX,0510
MOV ES,AX
MOV AX,F610
MOV DS,AX
MOV CX,0FFF
REPZ
MOVSW
MOV AX,0500
MOV DS,AX
MOV ES,AX
JMP 0500:0100
When I burn a ROM and try this, the Palo Alto program puts garbled text on the screen, and I have determined the welcome message in Palo Alto is being pulled from a memory location that is wrong by about 126 bytes. (?). However, if I boot DOS and go into DEBUG and issue a G=F600:0000 the whole thing works perfectly! Here is one of about 20 coding attempts to do this simple task:
MOV AX,0510
MOV ES,AX
MOV AX,F610
MOV DS,AX
MOV CX,0FFF
REPZ
MOVSW
MOV AX,0500
MOV DS,AX
MOV ES,AX
JMP 0500:0100