flat assembler
Message board for the users of flat assembler.

Index > OS Construction > value out of range

Author
Thread Post new topic Reply to topic
Consumed



Joined: 30 Sep 2004
Posts: 13
Location: Right behind you
Consumed 02 Feb 2005, 03:15
I get a value out of range error on the "jmp 0x08:clear_pipe" line in this code:
Code:
format binary
use16
org 0xF0000

bios:
cli
gdt:
gdt_null: dq 0
gdt_code: dw 0x0FFFF
          dw 0
          db 0
          db 10011010b
          db 11001111b
          db 0
gdt_data: dw 0FFFFh
          dw 0
          db 0
          db 10010010b
          db 11001111b
          db 0
gdt_end:
gdt_desc: db gdt_end - gdt - 1
          dd gdt

xor ax, ax
mov ds, ax
lgdt [gdt_desc]

mov eax, cr0
or eax, 1
mov cr0, eax
jmp 0x08:clear_pipe

use32
clear_pipe:

mov ax, 0x08
mov ds, ax
mov ss, ax

mov esp, 0x090000

times bios+65535-2-$ db 0x90

jmp $    

And incase your wondering about what that code is, I'm making a Bochs BIOS. Didn't know where else to stick this, so I figured os construction was close enough. Any help with my prob is appreciated.

-Consumed
Post 02 Feb 2005, 03:15
View user's profile Send private message Visit poster's website Reply with quote
crc



Joined: 21 Jun 2003
Posts: 637
Location: Penndel, PA [USA]
crc 02 Feb 2005, 03:43
Change the "org 0xF0000" to "org 0xF000" and it'll assemble fine Smile
Post 02 Feb 2005, 03:43
View user's profile Send private message Visit poster's website Reply with quote
Consumed



Joined: 30 Sep 2004
Posts: 13
Location: Right behind you
Consumed 02 Feb 2005, 04:00
That did the trick. Thx. Smile
Post 02 Feb 2005, 04:00
View user's profile Send private message Visit poster's website Reply with quote
ASHLEY4



Joined: 28 Apr 2004
Posts: 376
Location: UK
ASHLEY4 02 Feb 2005, 06:54
Consumed wrote:
I get a value out of range error on the "jmp 0x08:clear_pipe" line in this code:
Code:
format binaryuse16org 0xF0000bios:cligdt:gdt_null: dq 0gdt_code: dw 0x0FFFF          dw 0          db 0          db 10011010b          db 11001111b          db 0gdt_data: dw 0FFFFh          dw 0          db 0          db 10010010b          db 11001111b          db 0gdt_end:gdt_desc: db gdt_end - gdt - 1          dd gdtxor ax, axmov ds, axlgdt [gdt_desc]mov eax, cr0or eax, 1mov cr0, eaxjmp 0x08:clear_pipeuse32clear_pipe:mov ax, 0x08     ;<********* should this not be 10h ??????mov ds, axmov ss, axmov esp, 0x090000times bios+65535-2-$ db 0x90jmp $    


_________________
\\\\||////
(@@)
ASHLEY4.

Batteries not included, Some assembly required.
Post 02 Feb 2005, 06:54
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.