flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > int 0x13 ah = 0x02 (Read) |
Author |
|
LocoDelAssembly 12 Dec 2005, 23:13
See this http://www.ctyme.com/intr/rb-0607.htm
[edit] mmmm, but your code works fine, I tried this: Code: org 100h @@: ; Reset FDD xor ax,ax mov dl,[DRIVE_ID] ; DRIVE_ID = 0x00 usually int 0x13 jc @b ; Read Sectors mov ax,0x0202 ; Read | 2 Sectors mov bx,buffer ;\ mov cx,0x010F ; From Cylinder 1, sector 15 ( ??? ) mov dh,0x00 ; Head 0 ( ??? ) int 0x13 jc @b int 20h DRIVE_ID db 0 buffer: Ralf Brown wrote: Notes: Errors on a floppy may be due to the motor failing to spin up quickly enough; the read should be retried at least three times, resetting the disk with AH=00h between attempts |
|||
12 Dec 2005, 23:13 |
|
cod3b453 16 Dec 2005, 13:44
thanks for checking it locodelassembly!
however, i realised it was memory location error this code it executed in real mode hence the memory limit is 0010:0000 i feel so stupid. |
|||
16 Dec 2005, 13:44 |
|
LocoDelAssembly 16 Dec 2005, 13:48
no no, if you are in real mode 0200:0000 is the address 2000h and 0010:0000 is the address 100h. Remember that in real mode the effective address is Segment*10h + Offset
|
|||
16 Dec 2005, 13:48 |
|
cod3b453 16 Dec 2005, 18:00
so in pmode i would put 0x08:0x2000?
|
|||
16 Dec 2005, 18:00 |
|
LocoDelAssembly 16 Dec 2005, 18:36
In pmode the things are different, the linear address is calculated as Selector.BaseAddress + Offset, if the base address is 0, then your example will access to the address 0x2000 (supposing the Limit is setted to allow access to this address).
About pmode I can't help you very much, I'd never programmed something that works with pmode (except Windows apps which has no need to worry about this because you can always access the 4 GB). However if you need something about this with the search feature of the forum you will find something, I think |
|||
16 Dec 2005, 18:36 |
|
cod3b453 16 Dec 2005, 19:17
Thanks again for your help locodelassembly!
i'll keep playing around and see what happens...hopefully, sometime in the next decade i'll have something that works |
|||
16 Dec 2005, 19:17 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.