I am studying assembly of the C64, and of course using VICE to do so. VICE has the load
command to load data straight into the C64 RAM. I reckoned I could use that to put machine code into RAM and run it from there.
The weird thing now is that the load
command seems to skip the first two bytes when loading data. I have this hex file:
[bf@localhost asm]$ hexdump -C test.hex
00000000 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 |................|
But, when I load it into the RAM, it starts with byte with the value 03
:
(C:$8170) load "/path/to/test.hex" 0 8000
Loading /path/to/test.hex from 8000
to 801D (1d bytes)
(C:$8170) m 8000
>C:8000 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 10 11 12 ................
Am I doing something wrong?
01 00
and00 01
as the first two bytes, and see what happens. (If I'm right, one of those is 1, and the other is 256.) It doesn't look like it, though.