flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
baldr
badc0de02,
First link in Google Search results for "read cmos" refers to all the necessary information. |
|||
![]() |
|
badc0de02
how about a example in ASM?
|
|||
![]() |
|
baldr
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, '$' |
|||
![]() |
|
badc0de02
Thanks, baldr!
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.