File tree Expand file tree Collapse file tree 3 files changed +65
-0
lines changed
tests/functional/arch/zx48k Expand file tree Collapse file tree 3 files changed +65
-0
lines changed Original file line number Diff line number Diff line change @@ -341,6 +341,9 @@ def _cast(ins: Quad):
341341
342342 xsB = sB = YY_TYPES [tB ] # Type sizes
343343
344+ if tA in ("u8" , "i8" ) and tB == "bool" :
345+ return [] # bytes are booleans already (0 = False, not 0 = True)
346+
344347 output = []
345348 if tA in ("u8" , "i8" , "bool" ):
346349 output .extend (Bits8 .get_oper (ins [4 ]))
Original file line number Diff line number Diff line change 1+ org 32768
2+ .core.__START_PROGRAM:
3+ di
4+ push ix
5+ push iy
6+ exx
7+ push hl
8+ exx
9+ ld hl , 0
10+ add hl , sp
11+ ld (.core.__CALL_BACK__) , hl
12+ ei
13+ jp .core.__MAIN_PROGRAM__
14+ .core.__CALL_BACK__:
15+ DEFW 0
16+ .core.ZXBASIC_USER_DATA:
17+ ; Defines USER DATA Length in bytes
18+ .core.ZXBASIC_USER_DATA_LEN EQU .core.ZXBASIC_USER_DATA_END - .core.ZXBASIC_USER_DATA
19+ .core.__LABEL__.ZXBASIC_USER_DATA_LEN EQU .core.ZXBASIC_USER_DATA_LEN
20+ .core.__LABEL__.ZXBASIC_USER_DATA EQU .core.ZXBASIC_USER_DATA
21+ _pldx:
22+ DEFB 00
23+ .core.ZXBASIC_USER_DATA_END:
24+ .core.__MAIN_PROGRAM__:
25+ ld hl , 0
26+ ld b , h
27+ ld c , l
28+ .core.__END_PROGRAM:
29+ di
30+ ld hl , (.core.__CALL_BACK__)
31+ ld sp , hl
32+ exx
33+ pop hl
34+ exx
35+ pop iy
36+ pop ix
37+ ei
38+ ret
39+ _ReadKeys:
40+ push ix
41+ ld ix , 0
42+ add ix , sp
43+ pop af
44+ ld hl , (_pldx - 1 )
45+ or h
46+ jp z , .LABEL.__LABEL1
47+ ld a , 1
48+ ld (_pldx) , a
49+ .LABEL.__LABEL1:
50+ _ReadKeys__leave:
51+ ld sp , ix
52+ pop ix
53+ ret
54+ ;; --- end of user code ---
55+ END
Original file line number Diff line number Diff line change 1+ dim pldx as ubyte
2+
3+ sub ReadKeys()
4+ if pldx or (pldx and %1 ) then
5+ pldx = 1
6+ endif
7+ end sub
You can’t perform that action at this time.
0 commit comments