Hello. I am using NASM to assemble my assembler code. The code I assembled looks like this:
[BITS 32]
[ORG 0]
jmp 07c0h:start
testvar db 0, 0, 0, 0, 0, 0, 4, 8, 15, 16, 23, 42
start:
mov byte [testvar], 47
hang:
jmp hang
times 510-($-$$) db 0
dw 0AA55h
I had problems with another piece of code, I noticed that I couldn't modify memory, so I wrote this piece of code to test if that was actually the case. It was! I copied the assembled machine code to the first sector of a floppy, the program ran (I used MS VirtualPC). I checked RAM memory assigned to Virtual PC and searched for numbers 4 8 15 16 23 42, so that I could find where the binary code was copied. The first byte of the data was not touched. Why is it so?