All pastes #204309 Raw Edit

Unnamed

public text v1 · immutable
#204309 ·published 2006-10-15 21:04 UTC
rendered paste body
scodes db  '0' ,  '0' , '1', '2', '3', '4', '5', '6'
db	  '7', '8', '9', '0', '-', '=',  '0' ,  '0'
acode  db '0'

begin:  
        
	mov ax, cs		; Get the current segment
	mov ds, ax		; The data is in this segment
	cli			; disable interrupts while changing stack
	mov ss, ax		; We'll use this segment for the stack too
	mov sp, 0xfffe	; Start the stack at the top of the segment
	mov bp,sp
        push bp 
	sti


call read_kbd
;call write_kbd
call hang


read_kbd:
  	 mov al,scodes
         mov ah, 0x0e	; video function 0Eh (print char)
         mov bx, 0x0007	; color
         int 0x10
      	  retn