home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
CPM
/
PROGRAMS
/
LIST
/
EP-SRC.ARK
/
WADJUST.MAC
< prev
Wrap
Text File
|
1988-05-21
|
1KB
|
67 lines
;receive percentage adjustment in A (50-200%)
;return HL = stretch, DE = shrink
wadjust::
cpi 50
jnc $+5
mvi a,50
cpi 200+1
jc $+5
mvi a,200
mov e,a
mvi d,0
lxi h,wftab-50
dad d
mov e,m
;stretch is in low nibble
mov a,e
ani 0fh
mov l,a
mov h,d
;shrink in high one
mov a,e
rar
rar
rar
rar
ani 0fh
;we don't use sh = 1, so non-0 in tab were shifted down 1
ora a
jz $+4
inr a
mov e,a
ret
wftab:
;50-57
db 010H,010H,010H,01DH,01DH,01AH,019H,018H
db 017H,016H,015H,015H,015H,014H,014H,014H
;66
db 020H,020H,020H,020H,020H,02FH,02FH,02DH
db 02AH,030H,028H,028H,027H,026H,040H,025H
;82
db 03CH,03AH,050H,038H,060H,037H,070H,080H
db 023H,0A0H,0B0H,0C0H,034H,058H,045H,057H
;98
db 068H,056H,000H,000H,000H,076H,065H,054H
db 075H,085H,043H,00CH,00AH,0B5H,009H,032H
;114
db 0A4H,007H,063H,006H,073H,073H,005H,093H
db 0A3H,0A3H,0B3H,004H,052H,052H,052H,062H
;130
db 062H,062H,072H,072H,021H,092H,092H,0A2H
db 0B2H,0B2H,0C2H,0E2H,0E2H,0E2H,0E2H,0E2H
;146
db 0E2H,002H,002H,002H,002H,002H,002H,002H
db 002H,002H,041H,041H,041H,041H,041H,041H
;162
db 041H,041H,041H,051H,051H,051H,051H,051H
db 051H,061H,061H,061H,061H,071H,071H,071H
;178
db 081H,081H,091H,091H,0A1H,0A1H,0B1H,0B1H
db 0C1H,0C1H,0E1H,0E1H,0E1H,0E1H,0E1H,0E1H
;194
db 001H,001H,001H,001H,001H,001H,001H
end