Frage

I am trying to write a string into sector 2 of a hard-disk. It seems to be failing. Here is the code I have at the moment:

xor ax, ax
mov es, ax    
mov cx, 1     
mov dx, 0080h 
mov bx, NameString 
mov ax, 0301h 
int 13h

NameString db 'string', 0

Thank you guys!

War es hilfreich?

Lösung

The address of NameString needs to be in es:bx but you're zeroing es. Load es correctly and it will work.

Andere Tipps

Looks like you're attempting to write to sector 1, not sector 2.

An insane thing to try to do at this stage of the game, IMO, but I suppose it's a "fake" hard drive so you probably won't break anything critical... I hope...

Best, Frank

Im not familiar with writing on the hard-disk, but can this be usefull to you? How to write on hard disk with bios interrupt 13h

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top