flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
revolution
phreak wrote: Can I use the proc32 and struct macros without using win32a.inc? |
|||
![]() |
|
phreak
Hi, I have this program, that seems to work on windows.. I followed it with a debugger and everything works ok. But in my "command line" that is bootable program, it isnt work (I only use the procedure in my program, this code is a test).
What can be the problem? use32 format PE include "PROC32.H" stdcall mode03h_clear, 0x90 jmp $ ;-- ------------------------ ;clean screen ;-------------------------- proc mode03h_clear, color:BYTE ; CLEAR (byte color) mov ah,0x06 mov al,0x00 mov bh,[color] mov ch,0x00 mov cl,0x00 mov dh,0x18 mov dl,0x4F ;int 0x10 ;This doesnt work on windows... ret endp |
|||
![]() |
|
vid
you use PE format as your bootable format?
|
|||
![]() |
|
phreak
no, That source is a test program... I used PE so I coud debug with ollydbg...
The booteable is flat binary... I can upload the source if you have some time to see them.. |
|||
![]() |
|
vid
I believe problem is that you don't start 32bit protected mode before executing the code? Note that proc32.inc macros are written to be used in 32bit code, and PE is 32bit code too. And after you are in protected mode, interrupts doesn't work (so easily).
|
|||
![]() |
|
phreak
no .. I do start protected mode ...
but.. I use interrupts being on protected mode, so might that is the problem.. The program works until I use procedures.. please help! I upload the sources...
|
|||||||||||
![]() |
|
edfed
one error, you cannot use bios int in PM
int 13h, disk read, is unusable under protected mode because it is extracted from the IVT and not the IDT ivt =/= idt ivt = real mode idt = protected mode and even if the ivt = idt, in the most of case, code for RM doesn't work for PM. |
|||
![]() |
|
phreak
ok .. Thanks! I'll learn a bit more about PM..
Cannot use interrupts means that I have to access everything direct from memory? |
|||
![]() |
|
vid
phreak: no. you should start by writing just real mode code. But real mode code is (usually) only 16 bit, and those macros are for 32bit code.
That means: - write 16 bit real mode code - don't use proc32.inc, it is for 32bit code |
|||
![]() |
|
edfed
yes, and GOTO int13h topic in OS construction forum...
|
|||
![]() |
|
phreak
ja .. thanks for your help, but I want to use protected mode, no matter what it takes...
|
|||
![]() |
|
edfed
here
if you want to PM, the good section is OS construction... why? because people who are iterested in OS construction consult automatically this forum... and possible they are not interrested by MAIN topic,, so they will not consult the new messages in MAIN... |
|||
![]() |
|
phreak
ok, Thanks!
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.