3

(this my first question, excuse me for any mistakes)

I was messing around with debug.exe and tried to alter the BIOS date stored in address range FFFF:0005 to FFFF:000C.

-d FFFF:5 L 8
FFFF:0000                 30 31 2F-30 31 2F 39 32                 01/01/92

I finally figured out that to move to the address i want to modify i had to point the DS register to it and not the CS as erroneously stated in some sites(e.g. here)

-r DS
DS=073F
:FFFF

I also figured out that I can use the whole address to modify the exact memory address I want.

-e FFFF:000b
FFFF:000B  39.31   32.31

but then the output of dump command remained unchanged!!!

-d FFFF:5 L 8
FFFF:0000                 30 31 2F-30 31 2F 39 32                 01/01/92

I am suspecting that there are maybe some "protected" areas in memory I cannot modify, but I couldn't find any documentation about that is why I am asking. Can anyone possibly explain me why and how this is happening?

Thank you

P.S. Note that I am using DosBox to emulate this and to not brick my computer!(maybe this is the problem?)

Michael Petch
  • 46,082
  • 8
  • 107
  • 198
JohnyQ
  • 31
  • 1
  • 2
    You're trying to write to the BIOS ROM, which is read-only. It can't be changed except by recompiling DOSBox. (Or on a modern PC, by flashing a new BIOS.) – Ross Ridge Sep 06 '16 at 15:02
  • Thank you! So how can I know which addresses are Read-Only? I can do that through debug.exe or it is not possible? – JohnyQ Sep 06 '16 at 16:02
  • 2
    Any area marked as ROM (or potentially being ROM) is read-only (or potentially read-only) in the "ROM Area" table in the following table: http://wiki.osdev.org/Memory_Map_(x86) – Ross Ridge Sep 06 '16 at 17:55

1 Answers1

2

As the comments suggest, you are writing to ROM, so the values there can't be changed by your code. On modern machines you would get some sort of error as feedback for doing this, but on old hardware it's very common for writes to ROM to be silently ignored. In other words, the CPU will perform the requested operation anyway, but that operation will have no effect on the memory.

puppydrum64
  • 1,598
  • 2
  • 15