flat assembler
Message board for the users of flat assembler.

Index > OS Construction > IDT problem, using fasm.

Author
Thread Post new topic Reply to topic
kmtdk



Joined: 01 Aug 2008
Posts: 6
kmtdk 01 Aug 2008, 08:23
Hi
well i have this little problem using fasm, and an idt.
I have tryed reading this, http://wiki.osdev.org/I_Cant_Get_Interrupts_Working ; but fast seems not to handle it that way.

So how do i define the 32 bit address, using fasm.

KMT dk
Post 01 Aug 2008, 08:23
View user's profile Send private message Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 794
Location: Adelaide
sinsi 01 Aug 2008, 08:43
Where's your code? Not all of us have ESP you know... Smile
Post 01 Aug 2008, 08:43
View user's profile Send private message Reply with quote
kmtdk



Joined: 01 Aug 2008
Posts: 6
kmtdk 01 Aug 2008, 08:49
well
i can include the current one, but it dont compile, due to the problem of the idt and some other stuff, but thats not the deal Razz

it is attacheded


KMT dk


Description:
Download
Filename: idt.asm
Filesize: 8.3 KB
Downloaded: 298 Time(s)

Description:
Download
Filename: isr.asm
Filesize: 4.71 KB
Downloaded: 313 Time(s)

Description:
Download
Filename: kernel32.asm
Filesize: 832 Bytes
Downloaded: 313 Time(s)

Post 01 Aug 2008, 08:49
View user's profile Send private message Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 794
Location: Adelaide
sinsi 01 Aug 2008, 09:19
Well, you're not entering protected-mode, you're not loading the interrupt table, you're allowing all interrupts...
'pop esp' can cause problems with different cpu's

Compiles OK for me, but I ain't going to boot with it ('cause it's a mess - or incomplete)

Have a look at the attached - not pretty, but works for me.


Description:
Download
Filename: pic32.asm
Filesize: 4.47 KB
Downloaded: 315 Time(s)

Post 01 Aug 2008, 09:19
View user's profile Send private message Reply with quote
kmtdk



Joined: 01 Aug 2008
Posts: 6
kmtdk 01 Aug 2008, 09:26
WEll
i didnt include the hole code, just the code to show the idt
i will specf my question more currect:

im at adress 0x10000

i want to map the idt entry 0 to isr1
Inside the idt it looks like this:

Code:

dw isr1
dw 0x08
db 0
db 010001110b
dw isr1

    


How to tell fasm that the fist "dw isr1" it ment to be the high part of the address
and the last, of the "dw isr1" the last part of the address..

BTW, if i use the rest of the code, it boots good.
and im using fasm version 1.67.21

edit: [after looking at the code you posted] well, that is what i would do if nobody can tell me how to do it the other way

KMT dk
Post 01 Aug 2008, 09:26
View user's profile Send private message Reply with quote
kmtdk



Joined: 01 Aug 2008
Posts: 6
kmtdk 01 Aug 2008, 21:07
i have the solution:

using shl and shr
an example:

idt:
dw ((isr1 shl 0x30) shr 0x30) ; the high part of the address
dw 0x8 ; selector
db 0
db 010001110b ; type
dw (isr1 shr 0x10) the low part of the address




isr1:
mov ax,0xdead


edit: changed a error in the example
KMT dk
Post 01 Aug 2008, 21:07
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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.