-
Notifications
You must be signed in to change notification settings - Fork 85
/
Copy pathgetact.src
46 lines (37 loc) · 1.07 KB
/
getact.src
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
.messg "getact"
.subttl "getact"
.page
getact ldx lindx ; get the act buf#
lda buf0,x ; accm= act buf#
bpl ga1 ; x=lindx, n=1 no act buf
lda buf1,x
ga1 and #$bf ; strip dirty bit
rts
;get act buf#-set lbused,flgs
gaflgs ldx lindx
stx lbused ; save buf #
lda buf0,x
bpl ga3
txa
clc
adc #mxchns
sta lbused
lda buf1,x
ga3 sta t1
and #$1f
bit t1
rts ; n=1 no act buf/v=1 dirty buf
getina ldx lindx ; get ch's inact buf#
lda buf0,x
bmi gi10
lda buf1,x ; accm =buf#
gi10 cmp #$ff
rts ; ff=no inact buffer
putina ldx lindx ; put inact buff
ora #$80 ; accm=buf#
ldy buf0,x
bpl pi1
sta buf0,x
rts
pi1 sta buf1,x
rts