I am trying to make a ugBasic program mixed with z80 assembly for CPC.
Here is the code :
Code: Select all
BITMAP ENABLE(320,200,4)
CLS
trex := LOAD IMAGE("trex.png")
PUT IMAGE trex AT 0,0
PALETTE 20,23,4,28
DIM x AS BYTE
RESTORE ondul
FOR i=1 TO 75
READ x
ON CPUZ80 BEGIN ASM
LD BC,&BC02
OUTI
INC B
LD A,(_x)
OUT (C),A
END ASM
NEXT
ONDUL:
DATA 46,47,47,48,48,48
DATA 49,49,49,49,48,48,48
DATA 47,47,46,45,45,44
DATA 44,44,43,43,43,43
DATA 44,44,44,45,45
DATA 46,47,47,48,48,48
DATA 49,49,49,49,48,48,48
DATA 47,47,46,45,45,44
DATA 44,44,43,43,43,43
DATA 44,44,44,45,45
DATA 46,47,47,48,48,48
DATA 49,49,49,49,48,48,48
DATA 47,47,46,45,45,44
DATA 44,44,43,43,43,43
DATA 44,44,44,45,45
I used working examples from documentation, and used existing assembly code, I don't know what I am doing wrong ?