flat assembler
Message board for the users of flat assembler.

Index > Main > im stuck, again...

Author
Thread Post new topic Reply to topic
b1528932



Joined: 21 May 2010
Posts: 287
b1528932 23 Jun 2010, 19:48
i have a problem, using this sequence:
Code:
out 0,al
in al,0
out 0,ax
in ax,0
out 0,eax
in eax,0
out -1,al
in al,-1
out -1,ax
in ax,-1
out -1,eax
in eax,-1
jmp $    

goes right through jmp $

CR0.PE = 1
EFER.LME = 0
IOPL = 0
TR = 0
CPL = 3

in/out are privileged instruction, and they should generate exception with vector D. yet they execute, why? bochs even output me some i/o related messages. but all it should do is throw exception.
Post 23 Jun 2010, 19:48
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 23 Jun 2010, 20:21
I have not much experience with this so it may not be the exact problem, but have you checked how are you supposed to set-up the I/O permission bitmap in the TSS?
Post 23 Jun 2010, 20:21
View user's profile Send private message Reply with quote
b1528932



Joined: 21 May 2010
Posts: 287
b1528932 23 Jun 2010, 21:12
i never tested it yet, but i think i know how.
iopb is starting offset of map, TSS limit is the end. if i use map, i must make sure that number of its bytes is *2, because cpu read 2 bytes at once. last byte must be 0xFF.

i have Task Register = 0, so TSS is not used at all.

io bitmap has nothing to do with it.
Post 23 Jun 2010, 21:12
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.