home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Hack-Phreak Scene Programs
/
cleanhpvac.zip
/
cleanhpvac
/
TASMSWAN.ZIP
/
BOXCHAR.ASM
< prev
next >
Wrap
Assembly Source File
|
1989-07-17
|
806b
|
52 lines
%TITLE "Converts ALT-digit keys into box drawing characters"
IDEAL
DOSSEG
MODEL small
STACK 256
cr EQU 13
lf EQU 10
Fn10 EQU 100
LowIndex EQU 152
HighIndex EQU 161
DATASEG
message db cr,lf, 'Sample Character TABLE translation'
db cr,lf, 'Press Alt-1 to Alt-0 to display characters'
db cr,lf '>>>> Press F10 to end <<<<', cr,lf,lf,0
table db 179,180,191,192,193,194,195,196,217,218
CODESEG
EXTRN StrWrite:proc, GetCh:proc
Start:
mov ax,@data
mov ds,ax
mov es,ax
mov di,offset message
call StrWrite
@@10:
call GetCh
jnz @@10
cmp al,Fn10
je Exit
cmp al,LowIndex
jb @@10
cmp al,HighIndex
ja @@10
sub al,LowIndex
mov bx, offset table
xlat
mov dl,al
mov ah,2
int 21h
jmp @@10
Exit:
mov ax,04C00h
int 21h
END Start