Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- offset:dd 0
- selector: dw 0
- .dame_tecla_presionada:
- pushad
- xor eax,eax
- in al, 0x60 ; in lee un dispositivo. Aca guardamos el scan code en al
- call fin_intr_pic1
- push al
- call add_key_to_buffer
- cmp [task_wait_key] null
- jne .reestablecer
- .fin:
- popad
- iret
- .reestablecer:
- call task_wait_key
- push eax
- add_to_sheduler
- jmp .fin
- ._isr90:
- sub esp, 4
- push esp
- call get_key_from_buffer
- add esp, 4
- cmp eax 1
- je .hay_tecla
- jne .no_hay_tecla
- .fin:
- iret;
- .hay_tecla:
- call scancose_a_ascii ;esto me devuelve en al el ascii del scan code guardado en esp. asumo q esto libera el buffer
- jmp .fin
- .no_hay_tecla:
- call sched_tareaActual
- mov ebx eax
- mov [task_wait_key] ebx ;ebx= id tarea actual
- push ebx
- call remove_from_scheduler
- call next_task()
- mov [selector], ax
- jmp far [offset]
- jmp .si_hay_tecla
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement