-
Notifications
You must be signed in to change notification settings - Fork 2
/
ASM.LLI
86 lines (76 loc) · 1.59 KB
/
ASM.LLI
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
81
82
83
84
85
DECLARE SUB asm.loadprog (fl1$, s$)
DECLARE SUB asm.pokewordi (a1%, mem1&, mem2&)
DECLARE SUB asm.pokewordl (a1&, mem1&, mem2&)
DECLARE SUB asm.pokebytei (a1%, mem1&, mem2&)
DECLARE FUNCTION asm.peekbytei% (mem1&, mem2&)
DECLARE FUNCTION asm.peekwordi% (mem1&, mem2&)
DECLARE FUNCTION asm.peekwordl& (mem1&, mem2&)
DECLARE SUB asm.run (s$, off1&)
CLS
s$ = ""
asm.loadprog "notbox.dll", s$
DIM arr%(2)
SCREEN 13
DEF SEG = VARSEG(s$)
FOR i% = 0 TO 25
CALL absolute(BYVAL 0, BYVAL 0, BYVAL 319, BYVAL 199, SADD(s$))
FOR j% = 0 TO 2
PRINT arr%(j%);
NEXT
NEXT
DEF SEG
FOR i% = 0 TO 2
PRINT arr%(i%),
NEXT
SYSTEM
SUB asm.loadprog (fl1$, s$)
fr% = FREEFILE
OPEN "B", fr%, fl1$
FOR i& = 1 TO LOF(1)
s$ = s$ + INPUT$(1, #fr%)
NEXT
CLOSE #fr%
END SUB
FUNCTION asm.peekbytei% (mem1&, mem2&)
DEF SEG = mem1&
a1% = PEEK(mem2&)
DEF SEG
asm.peekbytei% = a1%
END FUNCTION
FUNCTION asm.peekwordi% (mem1&, mem2&)
DEF SEG = mem1&
a1% = PEEK(mem2&)
a1% = a1% + PEEK(mem2& + 1) * &H100
DEF SEG
asm.peekwordi% = a1%
END FUNCTION
FUNCTION asm.peekwordl& (mem1&, mem2&)
DEF SEG = mem1&
a1& = PEEK(mem2&)
a1& = a1& + PEEK(mem2& + 1) * &H100
DEF SEG
asm.peekwordl& = a1&
END FUNCTION
SUB asm.pokebytei (a1%, mem1&, mem2&)
DEF SEG = mem1&
POKE mem2&, a1% AND &HFF
DEF SEG
END SUB
SUB asm.pokewordi (a1%, mem1&, mem2&)
DEF SEG = mem1&
POKE mem2&, a1% \ &H100
POKE mem2& + 1, a1% AND &HFF
DEF SEG
END SUB
SUB asm.pokewordl (a1&, mem1&, mem2&)
DEF SEG = mem1&
POKE mem2&, (a1& AND &HFF00) \ &H100
POKE mem2& + 1, a1& AND &HFF
DEF SEG
END SUB
SUB asm.run (s$, off1&)
DEF SEG = VARSEG(s$)
mem1& = SADD(s$) + off1&
CALL absolute(mem1&)
DEF SEG
END SUB