flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Dex4u 16 Mar 2006, 01:29
I suggest you jump to the address in realmode, then change to pmode
Example from BOS: Boot end code: Code: -----------------------;; the file is loaded ;;-----------------------;quit: jmp 0x1000:0x0000 ; jump to loaded file (64kb in mem);-------------------------------------;; set the BOOT-signature at byte 510. ;;-------------------------------------; rb boot+512-2-$ dw 0xAA55 Second stage: Code: ;-------------------------------------------------------;; BOS kernel ;;-------------------------------------------------------;; BOS 32-bit kernel, expects to be loaded at 64kb ;; in mem. Small amount of 16-bit code included. ;; ;; For any comments on this code, mail me. ;; http://bos.asmhackers.net/ asmhacker@gmail.com ;; ;; by: Christoffer Bubach, 2003-2005 ;;-------------------------------------------------------;use16org 0x10000;---------------------------;; jump to starting point ;;---------------------------; jmp start;----------------------------------------;; 16-bit include files ;;----------------------------------------; ; some include files here:;--------------------------;; 16-bit entry point ;;--------------------------;start: cli mov ax, cs mov ds, ax ; fasm is more strict about xor eax, eax ; "org 0x10000" then nasm, so mov es, ax ; i have to do -0x10000 from mov fs, ax ; all variable addresses while mov gs, ax ; in realmode. sti call enable_a20 call do_all_16bit ; ... For more info see BOS source here: http://bos.asmhackers.net/downloads.php |
|||
![]() |
|
lazer1 16 Mar 2006, 13:21
Hi Dex4u,
that looks promising, I'll try the new ideas in your post and report back. I think it will succeed, ![]() |
|||
![]() |
|
lazer1 16 Mar 2006, 16:11
Hi again,
your suggestion has done the trick! ![]() at first the machine no longer reset ![]() but echo statements stopped functioning, ![]() after much debugging I found I was being careless with the use16 and use32 declarations, the bug was because of include files, the use32 declaration in the one include file was now extending to further include files which should have been use16, I have been putting asm code in include files ![]() anyway everything is fine now ![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.