Skip to content

Instantly share code, notes, and snippets.

@ssg
Created September 20, 2021 19:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ssg/02ce17ebdeff21b64273c7d9558c12aa to your computer and use it in GitHub Desktop.
Save ssg/02ce17ebdeff21b64273c7d9558c12aa to your computer and use it in GitHub Desktop.
Some keyboard handler I wrote. I don't remember why I started writing this.
{ SSG's Keyboard Handler - (c) 1995 SSG }
{$M $400,0,0}
uses Dos;
begin
asm
jmp @Init
@InstallText:
db 'SSG''s Keyboard Handler Version 1.00a - INSTALLED',13,10,'$'
@Old9:
dd 0
@RepChar:
db 0
@RepCount:
db 0
@CodeXLat:
1bh,31h,32h,33h,34h,35h,36h,37h,38h,39h,
30h,2dh,3dh,08h,09h,71h,77h,65h,72h,74h,
79h,75h,69h,6fh,70h,5bh,5dh,0dh,00h,61h,
73h,64h,66h,67h,68h,6ah,6bh,6ch,3bh,27h,
60h,00h,5ch,7ah,78h,63h,76h,62h,6eh,6dh,
2ch,2eh,2fh,2ah,00h,20h,00h,00h,00h,00h,
00h,00h,00h,00h,00h,00h,00h,00h,00h,00h,
00h,00h,00h,00h,2dh,00h,00h,00h,2bh,00h,
00h,00h,00h,00h,00h,5ch,0dh,2fh,00h,00h,
00h,00h,00h,00h,00h,00h,00h,00h,00h,00h,
@New9:
push ax
push ds
in al,60h
mov ah,al
@Finish:
mov al,$20
out $20,al
pop ds
pop ax
@Init:
push ds
mov ax,3509h
int 21h
mov word ptr cs:@Old9,bx
mov word ptr cs:@Old9+2,es
mov ax,2509h
push cs
pop ds
mov dx,offset @New9
int 21h
pop ds
mov ah,9
push cs
pop ds
mov dx,offset @InstallText
int 21h
end;
keep(0);
end.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment