/[projet1]/public/pc/tools/osdk/main/Osdk/_final_/lib2/oric.s
Defence Force logotype

Contents of /public/pc/tools/osdk/main/Osdk/_final_/lib2/oric.s

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1154 - (show annotations)
Sun Aug 10 18:19:54 2014 UTC (5 years, 3 months ago) by dbug
File size: 1543 byte(s)


1 _peek
2 ldy #$0 ; grab one 16-bit parameter
3 lda (sp),y ; LSB
4 sta tmp
5 iny
6 lda (sp),y ; MSB
7 sta tmp+1
8 ldy #$0
9 lda (tmp),y ; Peek at the memory
10 jmp grexit2 ; Return the byte found there
11
12
13 _deek
14 ldy #$0 ; grab one 16-bit parameter
15 lda (sp),y ; LSB
16 sta tmp
17 iny
18 lda (sp),y ; MSB
19 sta tmp+1
20 ldy #$0
21 lda (tmp),y ; Get the low order byte
22 tax
23 iny ; Next byte
24 lda (tmp),y ; Get high order byte
25 rts
26
27
28 _poke
29 ldy #$0 ; Grab one 16-bit parameter
30 lda (sp),y ; LSB
31 sta tmp
32 iny
33 lda (sp),y ; MSB
34 sta tmp+1
35 iny
36 lda (sp),y ; Grab an 8-bit parameter
37 ldy #$0
38 sta (tmp),y ; Poke the latter to the former
39 rts
40
41 _doke
42 ldy #$0 ; Grab one 16-bit parameter
43 lda (sp),y ; LSB
44 sta tmp
45 iny
46 lda (sp),y ; MSB
47 sta tmp+1
48 iny ; Grab another 16-bit parameter
49 lda (sp),y ; Grab the LSB first
50 ldy #$0
51 sta (tmp),y ; Poke the LSB
52 ldy #$3 ; Now grab the MSB
53 lda (sp),y
54 ldy #$1
55 sta (tmp),y ; And poke it as well
56 rts
57
58 _call ; Call a machine code routine
59 ldy #$0
60 lda (sp),y
61 sta tmp
62 iny
63 lda (sp),y
64 sta tmp+1
65 jmp (tmp)
66
67 _bang ; invoke the Basic '!' handler
68 ldy #$0 ; grab string pointer
69 lda (sp),y
70 sta $e9
71 iny
72 lda (sp),y
73 sta $ea
74
75 jsr $00e8 ; read first char
76 jmp ($02f5) ; call the ! command handler
77

  ViewVC Help
Powered by ViewVC 1.1.26