cancel
Showing results for 
Search instead for 
Did you mean: 

Drivers & Software

blockwizard
Journeyman III

How to writeto memory

I am trying to write to memory either the read or write doesn't work. I'm booting the code from my jump drive. The code is hexadecimal "bf 00 80 b8 03 03 ab be 00 80 b8 00 0e ac cd 10 ac cd 10".

In assembly that's:

mov di, 8000h

mov ax, 0303h

stos word ptr es:[di], ax

mov si, 8000h

mov ax, 000eh

lods byte ptr ds;[si], al

int 10

lods byte ptr ds;[si], al

int 10

I have tried adding the prefixes "66"h and "48"h so change the mode but it still does nothing. the result is either nothing printed or a space printed. I am so confused and I would appreciate any help possible.

PS. I did zero out "ds" and "es" before this code

0 Likes
1 Reply
blockwizard
Journeyman III

i have been working on fixing this and I solved my own problem. For some reason, unknown to me, bytes 1Ch-1Fh are loaded as zeros. No matter what I did I found that those bytes are zero instead of what is normally loaded. Since a lot of command are an odd number of bytes long, if one of those went into this zeroed out 4 bytes, it would throw off the rest of the code. This is what was causing the code to not function properly.

0 Likes