commit cb69573
Devine Lu Linvega
·
2025-07-01 02:55:59 +0000 UTC
parent ecaa3f0
Overflow example in expansion
1 files changed,
+14,
-9
+14,
-9
1@@ -7,28 +7,30 @@
2 ;buf #0006 ADD2 ;mmu-cpyl/a STA2
3 ;buf #0003 ADD2 ;mmu-cpyl/b STA2
4 ;mmu-cpyl .System/expansion DEO2
5- ;buf ;res1 ;dict/cpyl <test>
6+ ;dict/cpyl ;buf #0013 ;res1 mem/cmp <test>
7 ( | copy right )
8 ;buf #0003 ADD2 ;mmu-cpyr/a STA2
9 ;buf #0009 ADD2 ;mmu-cpyr/b STA2
10 ;mmu-cpyr .System/expansion DEO2
11- ;buf ;res2 ;dict/cpyr <test>
12+ ;dict/cpyr ;buf #0013 ;res2 mem/cmp <test>
13 ( | copy left )
14 ;buf #0009 ADD2 ;mmu-cpyl/a STA2
15 ;buf #0006 ADD2 ;mmu-cpyl/b STA2
16 ;mmu-cpyl .System/expansion DEO2
17- ;buf ;res3 ;dict/cpyl <test>
18+ ;dict/cpyl ;buf #0013 ;res3 mem/cmp <test>
19 ( | memset )
20 ;buf #0003 ADD2 ;mmu-fill/a STA2
21 ;mmu-fill .System/expansion DEO2
22- ;buf ;res4 ;dict/fill <test>
23+ ;dict/fill ;buf #0013 ;res4 mem/cmp <test>
24+ ( | boundary check )
25+ ;mmu-over .System/expansion DEO2
26+ ;dict/fill #0000 LDA #ffff LDA #8888 EQU2 <test>
27 BRK
28
29-@<test> ( a* b* -- )
30- <pstr>
31- #0013 SWP2 mem/cmp ?{
32- #010f DEO ;dict/fail !<pstr> }
33- ;dict/pass !<pstr>
34+@<test> ( name* f -- )
35+ ?{
36+ <pstr> #010f DEO ;dict/fail !<pstr> }
37+ <pstr> ;dict/pass !<pstr>
38
39 @<pstr> ( str* -- )
40 LDAk #18 DEO
41@@ -47,6 +49,7 @@
42 &cpyl "Expansion/cpyl: 20 $1
43 &cpyr "Expansion/cpyr: 20 $1
44 &fill "Expansion/fill: 20 $1
45+ &over "Expansion/Overflow: 20 $1
46 &pass "pass 0a $1
47 &fail "FAIL 0a $1
48
49@@ -60,3 +63,5 @@
50 @mmu-cpyl [ 01 0007 0000 &a $2 0000 &b $2 ]
51 @mmu-cpyr [ 02 0007 0000 &a $2 0000 &b $2 ]
52
53+@mmu-over [ 00 0000 0002 ffff 88 ]
54+