File:  [MW Coherent from dump] / coherent / d / conf / old_tboot / Examples / read_cmos.s
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:37 2019 UTC (7 years, 2 months ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent

CMOSA	=	0x70	/ Real-time Clock/CMOS addr I/O port.
CMOSD	=	0x71	/ Real-time Clock/CMOS data I/O port.
/
/       Read a byte from the CMOS.  Takes one argument--the
/       CMOS address to read from as an int; returns the
/       value read as a char.
/
        .globl	read_cmos_
read_cmos_:
	push	si
	push	di
        push    bp
        mov     bp, sp
        movb    al, 8(bp)       / Fetch address from stack.
        outb    CMOSA, al       / Send address to CMOS.
        jmp     .+2             / DELAY
        inb     al, CMOSD       / Get Value from CMOS.
	movb	ah, $0
        pop     bp
	pop	di
	pop	si
        ret                     / Return from read_cmos().


unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.