2824
|
1 * Disassembly by Os9disasm of gets.r
|
|
2
|
|
3 section code
|
|
4
|
|
5 gets: pshs u
|
|
6 ldu 4,s
|
|
7 bra L0008
|
|
8 L0006 stb ,u+
|
|
9 L0008 leax _iob,y
|
|
10 pshs x
|
|
11 lbsr getc
|
|
12 leas 2,s
|
|
13 cmpb #$0d
|
|
14 beq L0021
|
|
15 cmpd #-1
|
|
16 bne L0006
|
|
17 clra
|
|
18 clrb
|
|
19 bra L0025
|
|
20 L0021 clr ,u
|
|
21 ldd 4,s
|
|
22 L0025 puls u,pc
|
|
23 fgets: pshs u
|
|
24 ldx 4,s
|
|
25 clr ,x
|
|
26 ldu 6,s
|
|
27 beq L0060
|
|
28 pshs x
|
|
29 bra L003f
|
|
30 L0035 ldx ,s
|
|
31 stb ,x+
|
|
32 stx ,s
|
|
33 cmpb #$0d
|
|
34 beq L0054
|
|
35 L003f leau -1,u
|
|
36 stu -2,s
|
|
37 beq L0054
|
|
38 ldd 10,s
|
|
39 pshs d
|
|
40 lbsr getc
|
|
41 leas 2,s
|
|
42 cmpd #-1
|
|
43 bne L0035
|
|
44 L0054 clr [,s]
|
|
45 cmpd #-1
|
|
46 bne L0060
|
|
47 clra
|
|
48 clrb
|
|
49 bra L0062
|
|
50 L0060 ldd 6,s
|
|
51 L0062 leas 2,s
|
|
52 puls u,pc
|
|
53
|
|
54 endsect
|
|
55
|