String buffer in assembly and BIOS Inturrupts
Domanda
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!
Soluzione
The address of NameString needs to be in es:bx but you're zeroing es. Load es correctly and it will work.
Altri suggerimenti
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
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow