Previous | Contents | Next

A Farewell Program

(NEW ROM Users Only!)

This program looks particularly effective when run in the SLOW mode. I'm not telling you what it does - feed it in and find out....

BASIC:    1 REM one hundred and sixty one characters
          2 RAND USR 16514

MACHINE CODE: (To be written to address 4082 - decimal 16514):


21B940    LD HL,40B9        01FF0001    DEFB 01 FF 00 01
7E        LD A,(HL)         0100FFFF    DEFB 01 00 FF FF
23        INC HL            FE050C4E    DEFB FE 05 0C 4E
1F        RRA               7C54004E    DEFB 7C 54 00 4E
F5        PUSH AF           7C55B4AE    DEFB 7C 55 B4 AE
D7        RST 10            B2B2B1B1    DEFB B2 B2 B1 B1
F1        POP AF            B1B1B1B1    DEFB B1 B1 B1 B1
30F8      JR NC,F8          B1B1B0B4    DEFB B1 B1 B0 B4
0680      LD B,80           B5B5B3B3    DEFB B5 B5 B3 B3
3D        DEC A             B3B3B5B3    DEFB B3 B3 B5 B3
20FD      JR NZ,FD          B3B5B3B3    DEFB B3 B5 B3 B3
10FB      DJNZ FB           B5B3B3B3    DEFB B5 B3 B3 B3
01240A    LD BC,0A24        B3B0B0B0    DEFB B3 B0 B0 B0
C5        PUSH BC           B0B1B1B1    DEFB B0 B1 B1 B1
E5        PUSH HL           B0B1B0B1    DEFB B0 B1 B0 B1
CDB60B    CALL 0BB6         B1AEB3B3    DEFB B1 AE B3 B3
C1        POP BC            B5AFB0B0    DEFB B5 AF B0 B0
0A        LD A,(BC)         B1AEB1B0    DEFB B1 AE B1 B0
6F        LD L,A            B1B3B3B3    DEFB B1 B3 B3 B3
2640      LD H,40           B3B0B0B1    DEFB B3 B0 B0 B1
5E        LD E,(HL)         B1B3B3B3    DEFB B1 B3 B3 B3
2C        INC L             B1B1B0B0    DEFB B1 B1 B0 B0
56        LD D,(HL)         AEB2B1B2    DEFB AE B2 B1 B2
E1        POP HL            B1B2B1B2    DEFB B1 B2 B1 B2
C8        RET Z             B2B2B4B5    DEFB B2 B2 B4 B5
19        ADD HL,DE         B5B5B4B5    DEFB B5 B5 B4 B5
C5        PUSH BC           B5B4B5B5    DEFB B5 B4 B5 B5
4D        LD C,L            B4B5B5B4    DEFB B4 B5 B5 B4
44        LD B,H            B5B5AEB7    DEFB B5 B5 AE B7
E1        POP HL            FF          DEFB FF
23        INC HL
18E9      JR E9

[Download available for 16K ZX81 -> farewell.p]

Previous | Contents | Next