Skip to content

Commit 7d4df2b

Browse files
authored
[CBM] Add chkout C routine (#244)
1 parent 653182a commit 7d4df2b

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

mos-platform/commodore/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ add_platform_library(commodore-c
2727
cbm_k_basin.c
2828
cbm_k_bsout.c
2929
cbm_k_chkin.s
30+
cbm_k_chkout.s
3031
cbm_k_chrin.c
3132
cbm_k_chrout.c
3233
cbm_k_cint.c

mos-platform/commodore/cbm.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ unsigned char cbm_k_acptr (void);
209209
unsigned char cbm_k_basin (void);
210210
void cbm_k_bsout (unsigned char C);
211211
unsigned char cbm_k_chkin (unsigned char FN) __attribute__((leaf));
212+
unsigned char cbm_k_chkout (unsigned char FN) __attribute__((leaf));
212213
unsigned char cbm_k_chrin (void);
213214
void cbm_k_chrout (unsigned char C);
214215
void cbm_k_cint (void);
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
.text
2+
3+
;
4+
; unsigned char cbm_k_chkout (unsigned char FN);
5+
;
6+
.global cbm_k_chkout
7+
cbm_k_chkout:
8+
tax
9+
jsr __CHKOUT
10+
bcs some_error
11+
lda #0 ; open was successful if .C = clear
12+
some_error:
13+
rts

0 commit comments

Comments
 (0)