flat assembler
Message board for the users of flat assembler.
  
|  Index
      > OS Construction > fasm and Grub | 
| Author | 
 | 
| revolution 24 Mar 2012, 04:03 Your loadbase is at 1M. 16-bit code cannot jump to an address above 0xffff. Did you forget to place use32 at the start? | |||
|  24 Mar 2012, 04:03 | 
 | 
| flash 25 Mar 2012, 00:15 Thank's revolution, that's solve the problem!
 But... i though fasm compiles 32bit code by default   Good to know  | |||
|  25 Mar 2012, 00:15 | 
 | 
| egos 25 Mar 2012, 20:26 Grub supports BSS so no reason to put the bits into the file to reserve space for stack.
 Code: ; -------------------- ; Kernel stub for GRUB ; -------------------- MBH_MAGIC equ 0x1BADB002 MBH_FLAGS equ 0x10000 use32 org 0x100000 load_addr: header_addr: dd MBH_MAGIC dd MBH_FLAGS dd -MBH_MAGIC-MBH_FLAGS dd header_addr dd load_addr dd load_end_addr dd bss_end_addr dd entry_addr entry_addr: jmp $ load_end_addr: ; align 4 ; rb STACK_SIZE bss_end_addr: | |||
|  25 Mar 2012, 20:26 | 
 | 
| edfed 25 Mar 2012, 21:44 as x86 is real mode 16 bits by default, fasm compiles in 16bits by default too.
 don't know if it's for that reason, but if somebody asks, i think it can be a good answer cause it's logical. welcome in the flat assembly orthogonal universe. (not parallel, parallel means same direction)  | |||
|  25 Mar 2012, 21:44 | 
 | 
| flash 28 Mar 2012, 04:53 mmmm... the conclusion is something like: put allways "usexx" directive at binary code   | |||
|  28 Mar 2012, 04:53 | 
 | 
| < Last Thread | Next Thread > | 
| Forum Rules: 
 | 
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.