flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > reading txt file(memory buffer)... |
Author |
|
nop 10 Oct 2008, 09:23
hey abuashraf i can understand this code (i think ) looks ok to me but you didnt post all of it
are you running it in dos? i dont think you can cos im pretty sure 0x100:0 and 0x500:0 will be in the dos area unless you load DOS high ?? but there might still be some stuff down there and dos will crash. like 0x3000:0 and 0x4000:0 would be safer if you dont ask dos for the memory what debugger do you use? |
|||
10 Oct 2008, 09:23 |
|
revolution 10 Oct 2008, 09:45
nop: don't forget that this is the OS Construction section, so DOS is probably not running, one would imagine the OS is likely proprietary.
|
|||
10 Oct 2008, 09:45 |
|
sinsi 10 Oct 2008, 10:01
Code: mov bx,[es:di] ;address of fat table into memory Since ES:DI is always 100:0 you are reading cluster 0 every time (FFF I think) Code: mov dx, WORD [bx] ;read two bytes from FAT(dx=old value) If you are reading the FAT, you must use [ES:BX] You really should get used to the ES override you know... Code: cmp [cluster], 0x0FF0 ;test for end of file FF0 to FF6 are reserved, FF7 is a bad cluster, FF8 to FFF is used to mark the last cluster. |
|||
10 Oct 2008, 10:01 |
|
abuashraf 10 Oct 2008, 11:14
WoW sinsi,you are amazing,
It's working now ,thank you very much. |
|||
10 Oct 2008, 11:14 |
|
nop 11 Oct 2008, 03:07
revolution wrote: nop: don't forget that this is the OS Construction section, so DOS is probably not running, one would imagine the OS is likely proprietary. good point revolution, im so silly abuashraf what is your os? sinsi well spotted that my good friend es: aka 26h was missing |
|||
11 Oct 2008, 03:07 |
|
abuashraf 11 Oct 2008, 04:23
Quote: abuashraf what is your os? I'm writing my own real mode os,if that answer your question... |
|||
11 Oct 2008, 04:23 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.