D is for Dev - charlierobson/ZXpand-Vitamins GitHub Wiki
Or ... Things to make and do with ZXpand
Because BASIC doesn't support IN and OUT instructions you will need a bit of POKEing but nothing an adult human can't handle.
Disco
The LEDs on the Zxpands are controllable from software. With a simple OUT instruction you can turn them on and off again. Here's some BASIC to try:
10 REM ........
15 LET L=16514
20 POKE L,62
30 POKE L+2,1
40 POKE L+3,7
50 POKE L+4,224
60 POKE L+5,237
70 POKE L+6,121
80 POKE L+7,201
100 POKE L+1,182
110 RAND USR L
120 POKE L+1,184
130 RAND USR L
140 POKE L+1,183
150 RAND USR L
160 POKE L+1,185
170 RAND USR L
180 GOTO 100
Or for those more machine code inclined:
ld a,xyz
ld bc,$e007
out (c),a
xyz Value | Function |
---|---|
$b6 | green led on |
$b7 | green led off |
$b8 | red led on |
$b9 | red led off |