Fat12 loader.
Re:Fat12 loader.
Ok, followup I guess.
Carried on fiddling around with it, and the BIOS_Print routine works fine...but ONLY if I have org (The segment) at the top of the code.
So I guess this is a real newbie asm question now. How do I access the data if I have org 0? Already tried setting DS, ES, FS, GS to the segment I know it is in. Now I'm getting kinda confused.
Carried on fiddling around with it, and the BIOS_Print routine works fine...but ONLY if I have org (The segment) at the top of the code.
So I guess this is a real newbie asm question now. How do I access the data if I have org 0? Already tried setting DS, ES, FS, GS to the segment I know it is in. Now I'm getting kinda confused.
Re:Fat12 loader.
if you are going to use [org 0] it has to be set up like this:
mov ax,7c00h
mov ds,ax
If you plan to use [org 7c00h] it has to bet set up like this:
xor ax,ax
mov ds,ax
or you could do it like this also:
mov ax,cs
mov ds,ax
You should check out crazybuddhas baby steps #2 : bios print function on page 9 of this forum.
mov ax,7c00h
mov ds,ax
If you plan to use [org 7c00h] it has to bet set up like this:
xor ax,ax
mov ds,ax
or you could do it like this also:
mov ax,cs
mov ds,ax
You should check out crazybuddhas baby steps #2 : bios print function on page 9 of this forum.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Fat12 loader.
Aouch! don't do this !! 0000:7c00 == 07c0:0000beyondsociety wrote: if you are going to use [org 0] it has to be set up like this:
mov ax,7c00h
mov ds,ax
if you're in org 0, mov ax,07c0h is the right move ...
Re:Fat12 loader.
Loader was still wrong.
Need to change the line
AND AX, 0x0001
to
AND CX, 0x0001
Should be obvious where, and definitely makes it work now. Just in case anyone had actually tried to use it (*laughs at the idea*) and couldn't figure out why wierd things were happening. I would post the whole thing again, but I think I've taken up enough space with dumb code nobody needs
Need to change the line
AND AX, 0x0001
to
AND CX, 0x0001
Should be obvious where, and definitely makes it work now. Just in case anyone had actually tried to use it (*laughs at the idea*) and couldn't figure out why wierd things were happening. I would post the whole thing again, but I think I've taken up enough space with dumb code nobody needs