home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 December
/
simtel1292_SIMTEL_1292_Walnut_Creek.iso
/
msdos
/
printer
/
prtsc1.arc
/
PRTSC.8
next >
Wrap
Text File
|
1987-04-05
|
3KB
|
189 lines
; --==>> PrtSc.8 <<==-- (c)1987 - Darren G. Friedlein (4/2/87)
newps equ 67h
code segment
main: jmp start
; __Data Stuff__
monomon db ?
oldline dw 80 dup(?)
fvc db 1bh,'M',15d,1bh,'S',0,1bh,'3',15
fexp db 1bh,'W',1,1bh,'M'
fnlq db 1bh,'x',1
felite db 1bh,'M'
fbold db 1bh,'G'
freset db 1bh,'@'
newline db 'CNhNoNoNsNeN:N JSOtJaJnJdJaJrJdJ J JVOeJrJyJ-JcJoJnJdJeJnJsJeJdJ'
db ' J JEOxJpJaJnJdJeJdJ J JNOLJQJ J J9O6JcJpJiJ'
db ' J JBOoJlJdJfJaJcJeJ J JROeJmJoJvJeJ J<JPJrJtJSJcJ>J'
; __Resident Code__
respro: cli
push ax,bx,cx,dx,si,di,es,ds
push cs
pop ds
mov monomon,0
call montype
call getline
lea dx,newline
call putline
mov si,offset freset
mov cx,2
call pprint
mov ah,0
sti
int 16h
cli
lea dx,oldline
call putline
cmp al,'a'
jl l1
cmp al,'z'
jg l1
sub al,32
l1: cmp al,'V' ; This section of the code will get
jne l2 ; 1 keypress and adjusts the printer
mov si,offset fvc
mov cx,9
call pprint
l2: cmp al,'E'
jne l3
mov si,offset fexp
mov cx,5
call pprint
l3: cmp al,'N'
jne l4
mov si,offset fnlq
mov cx,3
call pprint
l4: cmp al,'9'
jne l5
mov si,offset felite
mov cx,2
call pprint
l5: cmp al,'B'
jne l6
mov si,offset fbold
mov cx,2
call pprint
l6: cmp al,27
jne l7
jmp popall
l7: cmp al,'R'
jne quit
sti
mov ah,35h
mov al,newps
int 21h
mov ah,25h
mov al,5
mov ds,es
mov dx,bx
int 21h
jmp popall
quit: sti
int newps
mov si,offset freset
mov cx,2
call pprint
jmp popall
popall: pop ds,es,di,si,dx,cx,bx,ax
iret
; __Subroutines__
montype proc
mov ah,15
int 10h
cmp al,7
jne em
mov monomon,1
em: ret
montype endp
getline proc
lea dx,oldline
mov ax,0b800h
cmp monomon,0
je g1
mov ax,0b000h
g1: mov es,ax
mov cx,80
mov di,dx
mov si,0
g2: mov ax,es:[si]
add si,2
mov [di],ax
add di,2
loop g2
ret
getline endp
putline proc ; set dx to the effective address of
push ax ; the string (80 words) to be placed
mov ax,0b800h ; at the top of the screen
cmp monomon,0
je p1
mov ax,0b000h
p1: mov es,ax
mov cx,80
mov si,dx
mov di,0
p2: lodsw
cmp monomon,0
je p5
cmp ah,'N'
jne p3
mov ah,'i'
p3: cmp ah,'O'
jne p4
mov ah,'j'
p4: cmp ah,'J'
jne p5
mov ah,7
p5: mov es:[di],ax
add di,2
loop p2
pop ax
ret
putline endp
pprint proc ; set si to offset & cx to length
pp1: mov al,[si]
mov ah,0
mov dx,0
int 17h
inc si
loop pp1
ret
pprint endp
; __Non-Resident Code__
resmess db 'PRTSC.COM - Darren Friedlen (4/2/87)',10d,13d
db ' Press <PrtSc> to activate',10d,13d,'$'
start: mov ah,35h
mov al,5
int 21h
push ds
mov ah,25h
mov al,newps
mov ds,es
mov dx,bx
int 21h
pop ds
mov ah,25h
mov al,5
mov dx,offset respro
int 21h
lea dx,resmess
call print
done: mov dx,offset resmess+1
int 27h
print proc
push ax
mov ah,9
int 21h
pop ax
ret
print endp
code ends