flat assembler
Message board for the users of flat assembler.

Index > OS Construction > How to enable keyboard input as well as mouse input and what

Author
Thread Post new topic Reply to topic
l4m2



Joined: 15 Jan 2015
Posts: 674
l4m2 12 Feb 2015, 02:57
How to enable keyboard input as well as mouse input and what is INT E0?
Code:
;GDT,IDT set
;cli used as soon as I turn the power on
  mov cx,(outsv-outss)/2
  mov si,outss
outing:
  lodsw
  movzx dx,ah
  out dx,al
  loop outing

  mov eax,cr0             ; equivalent to "or cr0,1"
  inc ax                  ;   switches the CPU in protected mode-
  mov cr0,eax             ;   protected mode enable
  ;jmp far 8:dword start32
  dq $000800100200ea66
  
outss:
  dw $21ff,$a1ff
  dw $2011,$2120,$2104,$2101
  dw $a011,$a128,$a102,$a101
  ;dw $21fb,$a1ff
  dw $2100,$a100
outsv:
start32:
  sti
  jmp $
    

but only one interrupt occured whose id is E0[/code]
Post 12 Feb 2015, 02:57
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20413
Location: In your JS exploiting you and your system
revolution 12 Feb 2015, 03:04
Why did you hard code the "jmp far 8:start32"? fasm can assemble it for you.
Post 12 Feb 2015, 03:04
View user's profile Send private message Visit poster's website Reply with quote
l4m2



Joined: 15 Jan 2015
Posts: 674
l4m2 12 Feb 2015, 03:05
revolution wrote:
Why did you hard code the "jmp far 8:start32"? fasm can assemble it for you.

Error: invalid operand.
Post 12 Feb 2015, 03:05
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20413
Location: In your JS exploiting you and your system
revolution 12 Feb 2015, 03:25
Use this:
Code:
jmp pword 8:start32    
Post 12 Feb 2015, 03:25
View user's profile Send private message Visit poster's website Reply with quote
l4m2



Joined: 15 Jan 2015
Posts: 674
l4m2 12 Feb 2015, 08:12
revolution wrote:
Use this:
Code:
jmp pword 8:start32    

so what about these
db67 lodsb
db66 loop
Post 12 Feb 2015, 08:12
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20413
Location: In your JS exploiting you and your system
revolution 12 Feb 2015, 08:17
lods supports address arguments, and loopd or loopw to ensure a particular size. These are described in the fasm.pdf manual.
Code:
lods byte[esi]
loopd    
Post 12 Feb 2015, 08:17
View user's profile Send private message Visit poster's website Reply with quote
l4m2



Joined: 15 Jan 2015
Posts: 674
l4m2 12 Feb 2015, 08:20
revolution wrote:
lods supports address arguments, and loopd or loopw to ensure a particular size. These are described in the fasm.pdf manual.
Code:
lods byte[esi]
loopd    

so that's my fault to misfound it:)
Post 12 Feb 2015, 08:20
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.