Micropower |
Volume 2 · Number 1 · February 1982 |
Page 14 of 37 |
---|
2D78 | 32FE2D | 1070 | LF (CONV), A | ; REVERSE | |
1075 | ; | ||||
1080 | ; CONVERT STRING | ||||
1085 | ; | ||||
2D7B | E1 | 1090 | CNVERT | POP HL | |
2D7C | 23 | 1100 | INV HL | ||
2D7D | CD8B1B | 1110 | CALL EXPR | ; GET STRING | |
2D80 | CD5115 | 1120 | CALL TSTCHR | ; TEST FOR | |
2D83 | 29 | 1130 | DEFB ") | ; COSING BRACKET | |
2D84 | E5 | 1140 | PUSH HL | ||
2D85 | CD6A21 | 1150 | CALL ASCO | ; GET STRING ADD. | |
2D88 | 2B | 1160 | DEC HL | ; AND LENGTH | |
2D89 | 2B | 1170 | DEC HL | ||
2D8A | 2B | 1180 | DEC HL | ||
2D8B | 46 | 1190 | LD B, (HL) | ; B=STRING LENGTH | |
2D8C | EB | 1200 | EX DE, HL | ; HLSTRING ADDRESS | |
1210 | ; | ||||
1220 | ; GOT STRING ADDRESS | ||||
2D8D | E5 | 1230 | PUSH HL | ; SAVE IT | |
2D8E | E5 | 1240 | PUSH HL | ; SAVE IT | |
2D8F | 78 | 1250 | LD A, B | ; SET A TO LENGTH | |
2D90 | CDA81F | 1260 | CALL ASNSTR | ; CREATE NEW STRING | |
2D93 | C1 | 1270 | POP BC | ||
2D94 | E1 | 1280 | POP HL | ||
2D95 | 3AFE2D | 1290 | CNV1 | LD A, (CONV) | ; GET FLAG |
2D98 | FE52 | 1300 | CP "R | ; REVERSE? | |
2D9A | 2824 | 1310 | JR Z, REVSTR | ; IF SO, JUMP | |
2D9C | FE4C | 1330 | JR NZ, CVNU | ; IF NOT, UPPEROOD | |
2DA0 | 7E | 1340 | LD A, (HL) | ||
2DA1 | FE41 | 1350 | CP "A | ; BEFORE "A"? | |
2DA3 | 3813 | 1360 | JR C, CNV2 | ; IF SO, LEAVE | |
2DA5 | FE5B | 1370 | CP "Z+1 | ; AFTER "Z"? | |
2DA7 | 300F | 1380 | JR NC, CNV2 | ; IF SO, LEAVE | |
2DA9 | C620 | 1390 | ADD A, 20H | ; CONVERT | |
2DAB | 180B | 1400 | JR CNV2 | ||
2DAD | 7E | 1410 | CNVU | LD A, (HL) | |
2DAE | FE61 | 1420 | CP "a | ; BEFORE "a"? | |
2DB0 | 3806 | 1430 | JR C, CNV2 | ; IF SO, LEAVE | |
2DB2 | FE7B | 1440 | CP "z+1 | ; AFTER "z"? 2DB4 | |
3002 | 3002 | 1450 | JR NC, CNV2 | ; IF SO, LEAVE | |
2DB6 | D620 | 1460 | SUB 20H | ; CONVERT | |
2DB8 | 12 | 1470 | CNV2 | LD (DE), A | ; SAVE CHARACTER |
2DB9 | 13 | 1480 | INC DE | ||
2DBA | 23 | 1490 | INC HL | ||
2DBB | 10D8 | 1500 | DJNZ CNV1 | ||
2DBD | C3D91F | 1540 | JP STREND | ; BACK TO BASIC | |
2DC0 | 48 | 1550 | REVSTR | LD C, B | ; SET BC TO LENGTH |
2DC1 | 0600 | 1560 | LD B, 0 | ||
2DC3 | 09 | 1570 | ADD HL, BC | ; ADD TO START | |
2DC4 | 2B | 1580 | DEC HL | ; TO GET END | |
2DC5 | 41 | 1590 | LD B,C | ; SET B TO LENGTH | |
2DC6 | 7E | 1600 | REV1 | LD A, (HL) | ; COPY CHARACTER |
2DC7 | 12 | 1610 | LD (DE), A | ||
2DC8 | 13 | 1620 | INC DE | ; ALTER POINTERS | |
2DC9 | 2B | 1630 | DEC HL | ||
2DCA | 10FA | 1640 | DJNZ REV1 | ; LOOP | |
2DCC | C3D91F | 1650 | JP STREND | ; BACK TO BASIC |
Page 14 of 37 |
---|