Mercurial > hg > Members > kono > os9 > sbc09
comparison src/os9/level2/cmds/sbc09.asm @ 91:1de7b2760b9d
fix basic
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 22 Aug 2018 15:02:28 +0900 |
parents | 60e629904ad6 |
children |
comparison
equal
deleted
inserted
replaced
90:ec33be78865e | 91:1de7b2760b9d |
---|---|
30 parmptr rmb 2 | 30 parmptr rmb 2 |
31 stdin rmb 1 | 31 stdin rmb 1 |
32 chksum rmb 1 | 32 chksum rmb 1 |
33 bcount rmb 1 | 33 bcount rmb 1 |
34 adr rmb 2 | 34 adr rmb 2 |
35 work rmb 2 | |
35 readbuff rmb $100 | 36 readbuff rmb $100 |
36 org $400 | 37 org $400 |
37 emstart rmb $e000-. | 38 emstart rmb $e000-. |
38 size equ . | 39 size equ . |
39 | 40 |
41 fcb edition | 42 fcb edition |
42 | 43 |
43 start | 44 start |
44 clr <stdin | 45 clr <stdin |
45 stx <parmptr save parameter pointer | 46 stx <parmptr save parameter pointer |
47 stu <work save parameter pointer | |
46 lda #READ. read access mode | 48 lda #READ. read access mode |
47 os9 I$Open open file | 49 os9 I$Open open file |
48 bcs L0049 branch if error | 50 bcs L0049 branch if error |
49 sta <filepath else save path to file | 51 sta <filepath else save path to file |
50 stx <parmptr and updated parm pointer | 52 stx <parmptr and updated parm pointer |
80 ldd ,x++ | 82 ldd ,x++ |
81 addb 1,s | 83 addb 1,s |
82 adca ,s | 84 adca ,s |
83 std ,u++ | 85 std ,u++ |
84 cmpx 2,s | 86 cmpx 2,s |
85 bne l1 | 87 ble l1 |
86 puls x,y | 88 puls x,y |
87 jmp $400 | 89 jmp $400 |
88 | 90 |
89 Exit clrb | 91 Exit clrb |
90 os9 F$Exit | 92 os9 F$Exit |
91 | 93 |
92 iotbl | 94 iotbl |
93 fdb getchar-iotbl | 95 fdb getchar-iotbl ; 0 |
94 fdb putchar-iotbl | 96 fdb putchar-iotbl ; 3 |
95 fdb getline-iotbl | 97 fdb getline-iotbl ; 6 |
96 fdb putline-iotbl | 98 fdb putline-iotbl ; 9 |
97 fdb putcr-iotbl | 99 fdb putcr-iotbl ; $C |
98 fdb getpoll-iotbl | 100 fdb getpoll-iotbl ; $F |
99 fdb xopenin-iotbl | 101 fdb xopenin-iotbl ; $12 |
100 fdb xopenout-iotbl | 102 fdb xopenout-iotbl ; $15 |
101 fdb xabortin-iotbl | 103 fdb xabortin-iotbl ; $18 |
102 fdb xclosein-iotbl | 104 fdb xclosein-iotbl ; $1B |
103 fdb xcloseout-iotbl | 105 fdb xcloseout-iotbl ; $21 |
104 fdb delay-iotbl | 106 fdb delay-iotbl ; $24 |
107 fdb noecho-iotbl ; $27 | |
105 iotblend | 108 iotblend |
106 | 109 |
107 L0049 | 110 L0049 |
108 err ldb #1 | 111 err ldb #1 |
109 bra Exit | 112 bra Exit |
233 xabortin | 236 xabortin |
234 xclosein | 237 xclosein |
235 xcloseout | 238 xcloseout |
236 RTS | 239 RTS |
237 | 240 |
241 noecho LDA <stdin | |
242 CLRB | |
243 LDX <work | |
244 leax readbuff,X | |
245 OS9 I$GetStt | |
246 bcs err2 | |
247 CLR IT.EKO,X | |
248 CLRB | |
249 OS9 I$SetStt | |
250 err2 | |
251 RTS | |
252 | |
238 delay PSHS D,X * address **$21** | 253 delay PSHS D,X * address **$21** |
239 * On input the D register contains the number of timer | 254 * On input the D register contains the number of timer |
240 * ticks to wait. Each timer tick is 20ms | 255 * ticks to wait. Each timer tick is 20ms |
241 TFR D,X | 256 TFR D,X |
242 OS9 F$Sleep | 257 OS9 F$Sleep |