home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
rexxlb.zip
/
SAMPLES
/
ASCII.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1993-01-08
|
2KB
|
44 lines
/*****************************************************************************/
/* */
/* ASCII: display an ASCII chart */
/* */
/* Requires Personal REXX or REXXLIB (scrsize, scrwrite, scrput, cursor */
/* functions). */
/* */
/*****************************************************************************/
line. = ''
call calcascii 0, 127, 0
call calcascii 128, 255, 128
horizontal = 'c4'x
vertical = 'b3'x
parse value scrsize() with height width .
call scrwrite 1, 1, '', height * width, ' ', 31 /* clear screen */
call scrput 1, 1, " Ascii Chart"
call scrput 2, 1, " 0 10 20 30 40 50 60 70 80 90 A0 B0 C0 D0 E0 F0"
call scrput 3, 1, " 0 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240"
call scrput 4, 1, " " || 'da'x || copies('c4'x, 65) || 'bf'x
buf = " "vertical
do loop = 0 to 15
gloop = loop // 16
if loop = 10 then buf = vertical
call scrput loop + 5, 1, d2x(gloop) gloop buf line.loop||vertical||d2x(gloop) gloop
end
call scrput 21, 1, " " || 'c0'x || copies('c4'x, 65) || 'd9'x
call cursor 22, 1
exit
Calcascii:
parse arg start, ending, breakoff
do loop = start to ending
if loop < breakoff then chars = " . "
else chars = " "||d2c(loop)||" "
gloop = (loop // 16)
line.gloop = line.gloop || chars
end
return