NEC PC-6001 support sources are initially added.
This commit is contained in:
parent
c258a2e83a
commit
6dd93a3d04
27 changed files with 2703 additions and 0 deletions
34
platform/pc-6001/dev/clock.S
Normal file
34
platform/pc-6001/dev/clock.S
Normal file
|
@ -0,0 +1,34 @@
|
|||
;;;
|
||||
;;;
|
||||
;;; clock.S
|
||||
;;;
|
||||
;;; retrieve tickcount from PC-6001's internal timer
|
||||
;;;
|
||||
;;; @author Takahide Matsutsuka <markn@markn.org>
|
||||
;;;
|
||||
;;; $Id: clock.S,v 1.1 2007/09/11 12:12:59 matsutsuka Exp $
|
||||
;;;
|
||||
.globl _clock_time
|
||||
|
||||
.area _GSINIT
|
||||
;; ---------------------------------
|
||||
;; unsigned long clock_time();
|
||||
;; __BCDEHL____
|
||||
;; return long value as (DE, BC)
|
||||
;; ---------------------------------
|
||||
;; this function uses PC-6001's internal timer
|
||||
;; which counts up 2 per 1/512 sec.
|
||||
.area _CODE
|
||||
_clock_time:
|
||||
ld hl, #0xfa28
|
||||
ld c, (hl)
|
||||
inc hl
|
||||
ld b, (hl)
|
||||
inc hl
|
||||
ld e, (hl)
|
||||
inc hl
|
||||
ld d, (hl)
|
||||
ld l, c
|
||||
ld h, b
|
||||
|
||||
ret
|
Loading…
Add table
Add a link
Reference in a new issue