How do I run programs?
hdfsyu opened this issue · comments
So I read through the README.md file and I tried everything I can to run a program I know how to get the screen running now but I have no idea how to run the demo.asm program I used the asm assembly executable and typed ./bin/asm programs/demo.asm demo then I loaded the output then ran the output with the command run 2 and it was blank also I ran the asm output because I thought the asm compiler was for compiling the programs and convert them into roms but it didn't work I also tried a few commands to make it work they didn't work either please help
Please read the README
again, and the text of the program you're trying to run. demo.asm
runs at ADDR_RAM
(0xC000
) so you need to load it there and get the PC there somehow. It also depends on the OS which you need to load from ostext.asm
at address 0
as well. The run
command takes the speed to run at, not the address, as an argument.
Please just use the issue if you have further problems rather than opening a new one.
Please read the
README
again, and the text of the program you're trying to run.demo.asm
runs atADDR_RAM
(0xC000
) so you need to load it there and get the PC there somehow. It also depends on the OS which you need to load fromostext.asm
at address0
as well. Therun
command takes the speed to run at, not the address, as an argument.Please just use the issue if you have further problems rather than opening a new one.
Ok im very sorry for annoying you with these issues but I am getting another error and I followed your instructions and yes I know run takes the speed I did run 2 for 2hz so now I ran the jdh-8 with /bin/emu -l programs/demo.asm 0xC000 -l os/ostext.asm 0 -m kb -m screen -r 1
and it is now saying Attempt to write to ROM at [0x0000] (pc=[0x0001])
Attempt to write to ROM at [0x534F] (pc=[0x0004])
Attempt to write to ROM at [0x4554] (pc=[0x0007])
Attempt to write to ROM at [0x4854] (pc=[0x000E])
Attempt to write to ROM at [0x414D] (pc=[0x001A])
Attempt to write to ROM at [0x5341] (pc=[0x001F])
Attempt to write to ROM at [0x4F46] (pc=[0x002D])
Attempt to write to ROM at [0x444A] (pc=[0x0035])
Attempt to write to ROM at [0x3B20] (pc=[0x0037])
Attempt to write to ROM at [0x000B] (pc=[0x0038])
Attempt to write to ROM at [0x4F52] (pc=[0x003B])
Attempt to write to ROM at [0x000B] (pc=[0x003F])
Attempt to write to ROM at [0x6F63] (pc=[0x0042])
Unused port for INB: 114
then the SCREEN module just does nothing and emu is frozen
You need to build the assembly files into binaries first. Use asm
.
This should be fixed now in 2b3b598 :) Try with a full command like this to make sure that everything is built: ./bin/asm programs/holiday/holiday.asm -o program.bin && ./bin/asm os/ostext.asm -o os.bin && ./bin/emu -l os.bin 0 -l program.bin 0xC000 -m kb -m screen -r realtime
Ok thanks!!