commit 747aae8
Devine Lu Linvega
·
2025-08-21 02:45:18 +0000 UTC
parent ee3f098
Added append port test
1 files changed,
+12,
-6
+12,
-6
1@@ -10,6 +10,7 @@
2 file/<load>
3 #0004 .File/success DEI2 NEQ2 ?fail
4 ;file/a1 LDA2 ;file/a2 LDA2 NEQ2 ?fail
5+ ;file/b1 LDA2 ;file/b2 LDA2 NEQ2 ?fail
6 ;file/stat-buf file/<stat>
7 ;file/stat-hs LDA2 LIT2 "00 NEQ2 ?fail
8 ;file/stat-ls LDA2 LIT2 "04 NEQ2 ?fail
9@@ -17,12 +18,12 @@
10 ;file/null-buf file/<stat>
11 ;file/null-buf LDA2 LIT2 "!! NEQ2 ?fail
12 ;dict/passed str/<print>
13- #800e DEO
14+ #800f DEO
15 BRK
16
17 @fail ( -> )
18 ;dict/failed str/<print>
19- #010e DEO
20+ #010f DEO
21 BRK
22
23 (
24@@ -30,14 +31,19 @@
25
26 @file/<create> ( -- )
27 ;&name .File/name DEO2
28- #0004 .File/length DEO2
29- ;&data .File/write DEO2
30+ #0002 .File/length DEO2
31+ ;&a1 .File/write DEO2
32+ ( | append )
33+ ;&name .File/name DEO2
34+ #0002 .File/length DEO2
35+ #01 .File/append DEO
36+ ;&b1 .File/write DEO2
37 JMP2r
38
39 @file/<load> ( -- )
40 ;&name .File/name DEO2
41 ( two more bytes than max length ) #0006 .File/length DEO2
42- ;&buf .File/read DEO2
43+ ;&load-buf .File/read DEO2
44 JMP2r
45
46 @file/<stat> ( buf* -- )
47@@ -68,7 +74,7 @@
48 &passed "Passed. 0a $1
49
50 @file/data &a1 1234 &b1 5678
51- ( load buf ) &buf &a2 $2 &b2 $2
52+ ( load buf ) &load-buf &a2 $2 &b2 $2
53 ( stat buf ) &stat-buf &stat-hs $2 &stat-ls $2
54 ( null buf ) &null-buf $4
55