80-Bus News

  

November–December 1982, Volume 1, Issue 4











Page 41 of 51











READ ROUTINE FOR THE GM822 RTC M-80

OOF’ 0021" 0023’ 0025’ 0027"

0028" o02B’ 0028’ 0031! 0033" 0035’ 0037" 0039’ o03c! 0038" 0040’ 0042’ 0043" 0044’ 0045’ 0046" 0048’

0049" 004A" 0048" 0048" oo4F’ 0050’ 0051" 0052" 0053"

ED ED DB ED cg

cD cD 2A 06 16 1B OE cD B6 FE 28 TT 23 15 1D 10 cg

TE 23 cD 46 23 80 12 13 cg

51 59 1c 51

0012"

OO7E’ oc EC 8c 1D oo1F’

OF EG

Fi

0054"

RRRH Sad RRRE

aR ae OR a em em om

READ: OUT out IN OUT RET

ee HERE

on em em

RDRTC: CALL CALL LD LD LD LD LD RDRTCL: CALL AND cP JR LD Ne DEC DEC DINZ RET

on en

BCD2BN: LD INC CALL LD INC ADD LD INC RET

HeRE Convert n

11 Oct 1982

10:49 PAGE 1-1

BER EEE EEE EE EEF E EEE EEE EEE EEN EERE EOE EE

*#**k* Subroutine to read to the MM58174 eee Called with:–

Bar ERE

C=PADDR – data port for command ***

DRTC regliater address

E=RTC reg. + strobe (R or W) JAMMIE HEE EEE BEBE HEHEHE HEHEHE EITHER

Read a MM58174 register

OUADDR

INDATA

HL, (PTR)

B12

D, TMONTH+NOSTRB B, TMONTH+RDSTRB C, PADDR

READ

A, (HL) HL TIME10

Routine to read the RTC registers

to work space in RAM at (HL) SREB EEEEREEREEEE EEE EEE EERE EEEE EER ERE EER ERES

an ae ee a Cg

en am

-

y

: ’

HERE ee

Set up address Read strobe on Read a nibble

Strobe off

REF PERE

Set command port to o/p Set data port to i/p

12 registers to read

10’s of months + no strobe 10’s of months + read strobe C = control port address

Get the data

Isolate the lower nibble Valid?

No, so start again

Store in workspace

Next RIC register

Loop if more Done

ibbles into single byte whee

Get 10’s

Get units

Save binary

READ ROUTINE FOR THE GM822 RTC M-80

0054" 0055’ 0056" 0057’ 0058’ 0059’

905A" 0058" cose’ o05D" 0055" 0061" 0064" 0067’ O06A’ 06D" O06E’ oo6F’ 0072 0074" 0076" ooTT’ oo7A’ 0078" oo7D"

OTE"

READ ROUTINE FOR THE GM622 RTC M-80

Macros:

Symbols: OOFF OOFF 0010 Oo1D oo1e 0039" OO5AT* oo0oc

No Fatal error(s)

OT AT OT OT 80 cg

OO7E* 0009 oo28’ OOTE" 0049" 04.

0049" FQ

ALLIN CMODE INTOUT PADDR PDATA RDRTICL TIME TMONTH

11 Oct 1982 10:49

Multiply <A> by 10

FRE

PAGE 1-2

on an ow

TIME1O: RLCA

ee en en an

TIME: LD

TIME:

LD B,A RLCA

RLCA

ADD A,B RET

ee rR eR am on

Multiply by 2

Save the partial product Multiply by 2 again Multiply by 2 again

Add the partial product

RELEREL ERE IRR PO Ok aE EE EEE EE

##*#* Get the current date and time in the

eee form:- Mth Dy Hr Mn So

RHEE KEKE

EERE EERE EEREEEEE EE EEN EER EE EER EEE EE

E, (HL) INC HL

LD D, (HL) EX DE, HL LD (PTR) ,HL CALL NDATA CALL INADDR CALL RDRTC

LD HL, (PTR) LD D,H

LD E,L CALL BCD2BN LDI

LD BY4 PUSH BC

CALL POP BC DINZ RET

DEFS 2

END

11 Oct 1982

001c 9009!

BASE TNADDR OOKO —- NOSTRB OO1F PCADDR COTE’ PTR 0080 —-RDSTRB 0076’ TIME COO «= TSTART

0049’ 0000" 0012" OO1E

0028" OO1F’ 0054"

*

Y

on em ae enn anew

oo

on

Get the addresa of TMS

Save it in PIR Set PIOs to RESET state

Get data into workspace Get back PTR Put HL in DE

41.

Do months Do DYWEEK

Do days, hours, mins, secs

All done

10:49 PAGE s

BCD2BN INDATA OUADDR PCDATA RDRTC READ TIME10O


This is an OCR’d version of the scanned page and likely contains recognition errors.











Page 41 of 51