flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
zhak 02 Aug 2006, 12:59
wow! your code is tooo complicated, i think. i suggest you to read one sector at a time. here's an example, but i didn't even compile it (i do not have the ability to test my code when i'm in office) so testing is up to you. the idea is above all at last
![]() Code: mov si, 0100h mov bp, 64 ;num of sectors to read mov ax, 800h mov es, ax xor bx, bx xor dx, dx mov dl, [DriveID] mov cx, 2 .read_sector: mov di, 5 .try_again: mov ax, 0201h int 13h jc .error dec bp jz .end_read add bx, 512 inc cl cmp cl, 19 jnz .read_sector test dx, si jz @f add cx, si @@: xor dx, si mov cl, 1 jmp .read_sector .error: mov ax, 0 int 13h jc .read_failed dec di jnz .try_again .read_failed: ... ;unable to read the disk .end_read: ... ;all done successfully Last edited by zhak on 02 Aug 2006, 15:02; edited 1 time in total |
|||
![]() |
|
cod3b453 02 Aug 2006, 14:33
Thanks zhak but that too didn't work (though it did give me a very amusing space invaders kinda screen dump
![]() |
|||
![]() |
|
zhak 02 Aug 2006, 15:05
hm, interesting.... i compiled a test floppy disk and executed it on bochs... all ok. all 64 sectors were read successfully....
i did a mistake in source code: should be not MOV ES, 800h but MOV AX, 800h MOV ES, AX |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.