flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution 06 Jun 2015, 04:39
Check the DF flag, perhaps it is set?
If not then I suspect your segment registers have been changed. The only difference between 'stosb' and 'mov [di],al | inc/dec di' is the segment register used (and the flags I suppose also). Otherwise show all of your code. |
|||
![]() |
|
Trinitek 06 Jun 2015, 05:02
It was something painfully obvious afterall. I neglected to preserve ES prior to a BIOS call that I would not have expected to destroy it.
BIOS, kids. Not even once. It'll ruin your life. |
|||
![]() |
|
revolution 06 Jun 2015, 05:06
Segment registers: Still destroying people's sanity 35 years later.
|
|||
![]() |
|
Mike Gonta 06 Jun 2015, 20:58
Trinitek wrote: It was something painfully obvious afterall. I neglected to preserve ES prior to a BIOS call that I would not have expected to destroy it. |
|||
![]() |
|
Trinitek 07 Jun 2015, 00:54
ax = 0xE820, int 0x15; running in VirtualBox. It had changed ES to 0xF000.
|
|||
![]() |
|
Mike Gonta 07 Jun 2015, 13:36
Trinitek wrote: ax = 0xE820, int 0x15; running in VirtualBox. It had changed ES to 0xF000. I modified SudoBIOS to print the es value on return. I tried it in the latest VirtualBox v4.3.28 (Windows 7) and the es was the same as it was going in (you need to set es:di to point to the return buffer). Of course, the int 0x15 call was made in 32 bit PM. There really is no need to program in real mode any more if all that you need is transparent BIOS access. Also, Qemu is much faster for test and development, since you don't have to convert the image file first.
|
||||||||||
![]() |
|
Trinitek 07 Jun 2015, 15:22
Nope. You're right. It was ah=0x08, int 0x13. I had to clear ES before the call anyway, so even if it didn't change it to 0xF000, it still wouldn't be right... I'm not having a very good week, as you can see.
Quote: Also, Qemu is much faster for test and development, since you don't have to convert the image file first. What do you mean "convert"? I'm building the floppy image using FASM and starting the VM from a little run.bat file, and that's fast enough for me. |
|||
![]() |
|
Mike Gonta 07 Jun 2015, 15:41
Trinitek wrote: Nope. You're right. It was ah=0x08, int 0x13. I had to clear ES before the call anyway, so even if it didn't Trinitek wrote:
a USB flash drive image which will boot and run as either emulation on real PC's. The SudoBIOS demo, for example is a 1.44MB fat12 floppy disk image, but will also boot and run as hard drive emulation. On some PC's you have no choice. |
|||
![]() |
|
Trinitek 07 Jun 2015, 16:28
I will eventually use it as the boot image for an CD ISO image. Is there any benefit from not emulating a floppy disk in this case?
|
|||
![]() |
|
Mike Gonta 07 Jun 2015, 16:33
Trinitek wrote: I will eventually use it as the boot image for an CD ISO image. Is there any benefit from not emulating a floppy disk in this case? (And hard to carry in your pocket). Boot media today is USB. |
|||
![]() |
|
Trinitek 07 Jun 2015, 16:41
Thanks for the pointers, Mike. I really apppreciate it.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.