mirror of
https://github.com/cc65/cc65.git
synced 2026-04-21 09:17:52 +00:00
add some conio functions
This commit is contained in:
@@ -0,0 +1 @@
|
||||
.include "../atari/cclear.s"
|
||||
@@ -0,0 +1 @@
|
||||
.include "../atari/chline.s"
|
||||
@@ -0,0 +1,35 @@
|
||||
;
|
||||
; from Atari computer version by Christian Groessler, 2014
|
||||
;
|
||||
; clock_t clock (void);
|
||||
; unsigned _clocks_per_sec (void);
|
||||
;
|
||||
|
||||
.export _clock, __clocks_per_sec
|
||||
.importzp sreg
|
||||
|
||||
.include "atari5200.inc"
|
||||
|
||||
|
||||
.proc _clock
|
||||
|
||||
ldx #5 ; Synchronize with Antic, so the interrupt won't change RTCLOK
|
||||
stx WSYNC ; while we're reading it. The synchronization is done same as
|
||||
@L1: dex ; in SETVBLV function in Atari OS.
|
||||
bne @L1
|
||||
stx sreg+1 ; Byte 3 is always zero
|
||||
stx sreg ; Byte 2 is always zero, too
|
||||
lda RTCLOK+1
|
||||
ldx RTCLOK
|
||||
rts
|
||||
|
||||
.endproc
|
||||
|
||||
|
||||
.proc __clocks_per_sec
|
||||
|
||||
ldx #$00 ; Clear high byte of return value
|
||||
lda #60
|
||||
rts
|
||||
|
||||
.endproc
|
||||
@@ -0,0 +1 @@
|
||||
.include "../atari/cvline.s"
|
||||
@@ -0,0 +1,39 @@
|
||||
;
|
||||
; Ullrich von Bassewitz, 2003-08-12
|
||||
;
|
||||
; unsigned char __fastcall__ _sysuname (struct utsname* buf);
|
||||
;
|
||||
|
||||
.export __sysuname, utsdata
|
||||
|
||||
.import utscopy
|
||||
|
||||
__sysuname = utscopy
|
||||
|
||||
;--------------------------------------------------------------------------
|
||||
; Data. We define a fixed utsname struct here and just copy it.
|
||||
|
||||
.rodata
|
||||
|
||||
utsdata:
|
||||
; sysname
|
||||
.asciiz "cc65"
|
||||
|
||||
; nodename
|
||||
.asciiz ""
|
||||
|
||||
; release
|
||||
.byte ((.VERSION >> 8) & $0F) + '0'
|
||||
.byte '.'
|
||||
.byte ((.VERSION >> 4) & $0F) + '0'
|
||||
.byte $00
|
||||
|
||||
; version
|
||||
.byte (.VERSION & $0F) + '0'
|
||||
.byte $00
|
||||
|
||||
; machine
|
||||
.asciiz "Atari5200"
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user