reading/writing sectors for filesystem
Posted: Mon Jan 11, 2010 5:56 pm
I have been working on my os and I want to implement a file system. I try to save to a sector and then later read from that sector and ouput the information to the screen. I think I am writing correctly but I can't tell if i am because I can't figure out how to read from it.
this is how i write:
and i read like this
I then output the value of [read+0] to the screen and it is not an 'A'. it isn't anything.
i don't know what I am doing wrong. none of the tutorials a have found show how to do what I want to do.
this is how i write:
Code: Select all
buffer TIMES 512 db 0
mov byte [buffer+0], 65
mov ah, 03h
mov al, 1
mov cl, 18
mov ch, 79
mov dh, 1
mov dl, 0
mov bx, [buffer]
int 13h
Code: Select all
read TIMES 512 db 0
mov ah, 02h
mov al, 1
mov cl, 18
mov ch, 79
mov dh, 1
mov dl, 0
mov bx, [read]
int 13h
i don't know what I am doing wrong. none of the tutorials a have found show how to do what I want to do.