Annotation of coherent/d/conf/tboot/Examples/read_cmos.s, revision 1.1.1.1

1.1       root        1: CMOSA  =       0x70    / Real-time Clock/CMOS addr I/O port.
                      2: CMOSD  =       0x71    / Real-time Clock/CMOS data I/O port.
                      3: /
                      4: /       Read a byte from the CMOS.  Takes one argument--the
                      5: /       CMOS address to read from as an int; returns the
                      6: /       value read as a char.
                      7: /
                      8:         .globl read_cmos_
                      9: read_cmos_:
                     10:        push    si
                     11:        push    di
                     12:         push    bp
                     13:         mov     bp, sp
                     14:         movb    al, 8(bp)       / Fetch address from stack.
                     15:         outb    CMOSA, al       / Send address to CMOS.
                     16:         jmp     .+2             / DELAY
                     17:         inb     al, CMOSD       / Get Value from CMOS.
                     18:        movb    ah, $0
                     19:         pop     bp
                     20:        pop     di
                     21:        pop     si
                     22:         ret                     / Return from read_cmos().
                     23: 

unix.superglobalmegacorp.com

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