summaryrefslogtreecommitdiff
path: root/software/ihu/ihu.asm
diff options
context:
space:
mode:
authorChristian Pointner <equinox@mur.at>2011-08-04 23:37:25 +0000
committerChristian Pointner <equinox@mur.at>2011-08-04 23:37:25 +0000
commited86861a1662c98a3267281e9f29cbed057ca2e5 (patch)
treeb06eb6bcdc00ae549af756bf0a96b592572d1471 /software/ihu/ihu.asm
parentminor cleanup (diff)
added multiplication code
git-svn-id: https://svn.spreadspace.org/mur.sat@102 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'software/ihu/ihu.asm')
-rw-r--r--software/ihu/ihu.asm72
1 files changed, 72 insertions, 0 deletions
diff --git a/software/ihu/ihu.asm b/software/ihu/ihu.asm
index 1c2f891..55d79a7 100644
--- a/software/ihu/ihu.asm
+++ b/software/ihu/ihu.asm
@@ -93,6 +93,18 @@ WAIT_CNT EQU H'0030'
BUF EQU H'0040'
BUF_END EQU H'004F'
+
+ ;; variables
+ ;; page 2 only
+CALC_ACC0 EQU H'0110'
+CALC_ACC1 EQU H'0111'
+CALC_ACC2 EQU H'0112'
+CALC_ACC3 EQU H'0113'
+CALC_TEMP0 EQU H'0114'
+CALC_TEMP1 EQU H'0115'
+CALC_TEMP2 EQU H'0116'
+CALC_TEMP3 EQU H'0117'
+
;; all pages
RTC_BYTE EQU H'0070'
@@ -241,6 +253,9 @@ uart_rx_fe
return
;; -------------------------------------
+ include "math.inc"
+
+ ;; -------------------------------------
include "ttx.inc"
;; -------------------------------------
@@ -260,6 +275,63 @@ main
movwf FSR
call rtc_get_time
+ swapf BUF+4,w
+ andlw b'00000011'
+ call digit
+ movwf TXREG
+ movlw .1
+ call wait_ms
+
+ movf BUF+4,w
+ andlw b'00001111'
+ call digit
+ movwf TXREG
+ movlw .1
+ call wait_ms
+
+ movlw '.'
+ movwf TXREG
+ movlw .1
+ call wait_ms
+
+ swapf BUF+5,w
+ andlw b'00000001'
+ call digit
+ movwf TXREG
+ movlw .1
+ call wait_ms
+
+ movf BUF+5,w
+ andlw b'00001111'
+ call digit
+ movwf TXREG
+ movlw .1
+ call wait_ms
+
+ movlw '.'
+ movwf TXREG
+ movlw .1
+ call wait_ms
+
+ swapf BUF+6,w
+ andlw b'00001111'
+ call digit
+ movwf TXREG
+ movlw .1
+ call wait_ms
+
+ movf BUF+6,w
+ andlw b'00001111'
+ call digit
+ movwf TXREG
+ movlw .1
+ call wait_ms
+
+ movlw ' '
+ movwf TXREG
+ movlw .1
+ call wait_ms
+
swapf BUF+2,w
andlw b'00000011'
call digit