-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathTestPython.a
More file actions
80 lines (65 loc) · 1.59 KB
/
TestPython.a
File metadata and controls
80 lines (65 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
!cpu 6510
!ct scr
!to "TestPython.prg", cbm
!initmem $a5
.myzp = $02
!macro MTest .p1 , .p2 {
; lda #<.p1
lda #<.p2
}
* = 1024
start
nop
!scriptpythonfile "TestPython.py"
!scriptpythoninline .myzp {
print("Python (inline) is assembling...")
print(acmeParameters)
acme.source(" inc .myzp+1\n inc $0401")
}
!scriptpythonfile "TestPython.py" , .myzp
!scriptpythonfile "TestPython.py" , .myzp , start
!scriptpythonfile "TestPython.py" , .myzp , "test string" , start
; Tests error display of undefined parameters
; +MTest .udef1 , start
*=$1000
TestMemory
!scriptpythoninline {
print("Python (inline2) is assembling...")
acme.bytenum(10)
acme.bytestr(str(123))
acme.bytestr(str([0,0xed,2,3,4,5,6,7,8,9,10]))
acme.bytestr(str(bytearray([8,9,10,11,12,13,202,203,69,70,71])))
}
TestMemoryEnd
*=$2000
!scriptpythoninline {
print("Python (inline bin1) is assembling...")
fileContent = []
with open("target/bin1.bin", mode='rb') as file:
fileContent = file.read()
acme.bytestr(str(fileContent))
}
*=$2200
!scriptpythoninline {
print("Python (inline bin2) is assembling...")
fileContent = []
with open("target/bin2.bin", mode='rb') as file:
fileContent = file.read()
acme.bytestr(str(fileContent))
}
*=$2400
!scriptpythoninline {
print("Python (inline bin3) is assembling...")
fileContent = []
with open("target/bin3.bin", mode='rb') as file:
fileContent = file.read()
acme.bytestr(str(fileContent))
}
*=$2600
!scriptpythoninline {
print("Python (inline bin4) is assembling...")
fileContent = []
with open("target/bin4.bin", mode='rb') as file:
fileContent = file.read()
acme.bytestr(str(fileContent))
}