flat assembler
Message board for the users of flat assembler.
Index
> OS Construction > Write/Read stuff from CMOS Or reset the CMOS |
Author |
|
baldr 23 Dec 2013, 11:19
badc0de02,
First link in Google Search results for "read cmos" refers to all the necessary information. |
|||
23 Dec 2013, 11:19 |
|
badc0de02 23 Dec 2013, 14:20
how about a example in ASM?
|
|||
23 Dec 2013, 14:20 |
|
baldr 23 Dec 2013, 14:51
Code: ; Read date and time from RTC org 0x100 macro cmos_read index* { mov al, index out 0x70, al in al, 0x71 } macro cmos_read_and_convert [index*] { cmos_read index aam 16 xchg ah, al or ax, '00' stosw inc di } mov dx, result mov di, dx cmos_read_and_convert 9, 8, 7; date cmos_read_and_convert 4, 2, 0; time mov ah, 9 int 0x21 ret result db '00-00-00 00:00:00', 13, 10, '$' |
|||
23 Dec 2013, 14:51 |
|
badc0de02 23 Dec 2013, 17:18
Thanks, baldr!
|
|||
23 Dec 2013, 17:18 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.