flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Teehee 06 Mar 2011, 17:03
ignore this.
Last edited by Teehee on 06 Mar 2011, 17:19; edited 1 time in total |
|||
![]() |
|
Teehee 06 Mar 2011, 17:19
Hey, you are doing cli and then doing an int. That can't work
![]() [edit:]its me or you really have a weird code? ![]() _________________ Sorry if bad english. |
|||
![]() |
|
Coty 06 Mar 2011, 18:02
Well First I see this.
Code: xor ax, ax call PMODEJMP <<<< DONT CALL PM JUMP!!! Calling from real mode and retrurning in PM could screw up as they use different addressing! call LOADGDT call CLS And then I see; Code: PMODEJMP: mov ax, 0x2401 int 0x15 ; enabling A20 line CLI PMODEJMP ; clearing interrupts mov bx, GDT_ADDRESS ; loading GDTR lgdt [cs:bx] MOV EAX, CR0 bts ax, 0h MOV CR0, EAX ; Protected Mode! ret << ??? SHOULD YOU NOT DO A LONG JUMP HERE ??? Acording to the intel i386 manuel you have to do a long jump that points CS to your code selector. eg. Code: JMP 0x0008:_PM _PM: ; We in PM now. Were do you tell FASM to generate 32bit code? Code: use32 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% teehee wrote: Hey, you are doing cli and then doing an int. That can't work AFAIK A software generated int is OK, those wont be ignored, there kinda like forced ints. but those generated by PIC will be ignored by CLI. Last edited by Coty on 06 Mar 2011, 22:08; edited 1 time in total |
|||
![]() |
|
roboman 06 Mar 2011, 18:28
You loaded up an address into bx, but bx gets used for other things by the int10 function you called:
AH = 0Eh AL = character to write BH = page number BL = foreground color |
|||
![]() |
|
BOTOKILLER 07 Mar 2011, 04:46
Coty wrote: Well First I see this. damn, it looks like i'll have to rewrite my code completely |
|||
![]() |
|
Teehee 08 Mar 2011, 00:31
Coty wrote:
![]() [edit:] i put a cli in the first line of my boot and it worked normaly. I think you'r right. ![]() _________________ Sorry if bad english. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.