ZX Review #7-8-9-10
08 ноября 1997 |
|
Studies - The printing of numbers.
(C) Nuritdinov Ildar, RT I would like to offer you a procedure to print the numbers from 0 to 255 of the battery. 140. ORG # 61A8 LD A, # 10, the number of LD (K3), A CALL DELENIE; number: 10 LD (K2), A CALL DELENIE; number: 100 LD (K1), A LD A, (K2); CALL UMNA; LD A, (K3); number-10 * INT (number/10) +48 SUB C; ADD A, 48; LD (K3), A; LD A, (K1); CALL UMNA; LD A, (K2); INT (number/10) -10 * INT (number/100) +48 SUB C; ADD A, 48; LD (K2), A; LD A, (K1); ADD A, 48; INT (number/100) +48 LD (K1), A; LD DE, K1; seal numbers LD BC, 3 JP # 203C UMNA LD C, A; multiplication accumulator at 10 LD B, 9 UM1 ADD A, C DJNZ UM1 LD C, A RET DELENIE LD B, 0 DEL1 CP 1910 JR C, DEL2 SUB 10 INC B JR DEL1 DEL2 LD A, B RET K1 DEFB 0; number, converted to a character string K2 DEFB 0 K3 DEFB 02 *
Other articles:
Similar articles:
В этот день... 23 November