| | |
bootstrap code fails
Thread Solved |
Are you clobberng your Segment register on purpose?
this should be more like
Asm Syntax (Toggle Plain Text)
xor ax,ax ;zero out ax mov ds,ax ;initialise data segment mov ss,ax
Asm Syntax (Toggle Plain Text)
mov ax,cs mov ds,ax mov ss,ax
Last edited by wildgoose; Sep 14th, 2009 at 4:53 pm.
•
•
Join Date: Nov 2006
Posts: 134
Reputation:
Solved Threads: 3
Last edited by mathematician; Sep 14th, 2009 at 4:59 pm.
•
•
Join Date: Nov 2006
Posts: 134
Reputation:
Solved Threads: 3
Last edited by mathematician; Sep 14th, 2009 at 5:14 pm.
As an experiment replace your
with
It'll then force the string load from the code segment!
Asm Syntax (Toggle Plain Text)
lodsb ; AL = [DS:SI]
Asm Syntax (Toggle Plain Text)
mov al,cs:[si] inc si
It'll then force the string load from the code segment!
•
•
Join Date: Nov 2006
Posts: 134
Reputation:
Solved Threads: 3
I was using the syntax used by C and some assemblers.
In the case of a boot sector cs=0 and ip=7c00h (always).
•
•
•
•
Examine your CS register and IP register.
What are their hex values when you first begin the code?
Everything looks correct but I still think its a Segment:Offset issue.
Initialize your Graphics card Page#0 column 0, row 0. Before doing anything.
And try writing your ASCII letters directly into the text frame buffer.
Initialize your Graphics card Page#0 column 0, row 0. Before doing anything.
And try writing your ASCII letters directly into the text frame buffer.
Assembly Syntax (Toggle Plain Text)
mov ax,0b800h mov es,ax xor edi,edi mov es:[edi],al inc edi inc edi
Last edited by wildgoose; Sep 14th, 2009 at 5:30 pm.
It's been a while, but I think this is right.
Upon execution of the bootloader
CS,DS,ES will be zero,
And there is a 512-byte stack allocated by the BIOS.
SS (points where?) SP ?
I do not know if interrupts are disabled.
Has anyone else tested this bootloader?
Could it be because of this guys hardware configuration?
Upon execution of the bootloader
CS,DS,ES will be zero,
And there is a 512-byte stack allocated by the BIOS.
SS (points where?) SP ?
I do not know if interrupts are disabled.
Has anyone else tested this bootloader?
Could it be because of this guys hardware configuration?
----------------------------------------------------------
To control a mind violates a man, and all it has been used for is
hurting and afflicting. Nowonder I progam in assembly...
--->Now available http://dotcoding.netai.net/
To control a mind violates a man, and all it has been used for is
hurting and afflicting. Nowonder I progam in assembly...
--->Now available http://dotcoding.netai.net/
•
•
Join Date: Nov 2006
Posts: 134
Reputation:
Solved Threads: 3
•
•
•
•
It's been a while, but I think this is right.
Upon execution of the bootloader
CS,DS,ES will be zero,
And there is a 512-byte stack allocated by the BIOS.
SS (points where?) SP ?
I do not know if interrupts are disabled.
Has anyone else tested this bootloader?
Could it be because of this guys hardware configuration?
It is difficult to see how the hardware configuration can be responsible, assuming that it is running on a PC. The 6845 will have been set up by the bios so that messages like "Not a System Disk" can be displayed.
I haven't got a floppy drive fitted to my computer, so I can't test it.
Last edited by mathematician; Sep 15th, 2009 at 7:48 am.
![]() |
Similar Threads
- Having problems with Null when running code in VB6 and MS Access (Visual Basic 4 / 5 / 6)
- Having problems with Null when running code in VB6 and MS Access (Visual Basic 4 / 5 / 6)
- Data Update Fails (ColdFusion)
- Need Help with this code (C++)
- stopping code executing if cancel button pressed on msgbox (VB.NET)
- reasons why malloc fails? (C)
- Queue; correct code but error msg :Help (C++)
- Malloc Fails (C)
Other Threads in the Assembly Forum
- Previous Thread: Nohau Emulator Problem
- Next Thread: Faulty observation
Views: 1304 | Replies: 22
| Thread Tools | Search this Thread |
Tag cloud for Assembly
80386 :( adress array asm assembler assembly associations beginner beginners boot bootloader buffer call compression cursor directory display div division docs dos endtask error exceptions file int10h integer intel interrupt interrupts language loop main mmx multiple newbie osdevelopment parsing print program range read remainder string text theory tsr x86





