80-Bus News

  

November–December 1982, Volume 1, Issue 4











Page 38 of 51











DRIVE ROUTINES FOR THE GEMINI GM822 RTC MODULE

0157 Osa’ o1se" O15E" 0160" 0162’ 0163’ 0166’ 0167’ 0168" 0169" O16B’

o16c’ o16r’ 0172"

o175’ 0178" 017B’ o17D’ O78" 0181" 0182" 0185" 0188"

018A" 018D’ O18F’ 0192" 0194" 0196" 0197" 019A’ O19B’ 0198" OTAt

O1A3" O1A6’ o1A9" O1AB’ OAD! 01B0" 01B2’ O1B4" o1B6’ o1B7"

21 06 16 1E OF TE cD 23 15 iD 10 cg

cD cD cD

ai oD 16 5F 2i 19 14 oO ED

BA D6 ep D6 16 5F 2i 19 44 o1 ED

21

"4

ED ED 14

3B ED ED 13 3D

0288" oC EF 4F 1D

otai’

Pv

ooFO’ OOF9’ O28"

02BB’ OID" 00

M-80

LD HL, WRESPC LD B,12 LD D, INSTAT+NOSTRB LD E, INSTAT+WRSTRB LD C, PADDR WRRTCL: LD A, (AL) CALL WRITE INC HL DEC D DEC B DINZ WRRICL RET

*e** Display the current date wee formi-

on te ee om

TIME: CALL . CALL CALL 3; Get the month LD HL, WSPACE CALL PLSTRG LD D,O LD E,A LD HL, MNSTRG ADD HL, DE LD DE, MONTH LD BC,3 LDIR 3; Get the day of the week LD A, (WSPACE+2) SUB 30H CALL TIMES SUB 3 LD D,O LD EA LD HL, DYSTRG ADD HL, DE LD DE, DAYMN LD BC,3 LDIR 3; Get the date and time . LD HL, WSPACE+3 LD DE, DAY LDI LDI LD DE, HOURS LD A,3 LDI LDI INC DE DEC A

INDATA INADDR RDRTC

HMS +

19:00:56.6 Mon 21 Sep 1982 JE HEHEHE SETHE EE HEME HEHEHE HEHE

14 Sep 1982 14:48 PAGE 1-4 Write from here

12 registers to write

Interrupt atatus + no strobe Interrupt statue + write strobe € = control port address

Get the data

Put in the RTC

AR an OR a ek a On

Next RTC register

Loop if more Done

on ee

and time in the *#+* ee

Set PIOs to RESET state

o-

-

Get data into workspace

Point to output string Calculate offset

on ae

Add it to <HL>

-

Copy across

on

Get day number

-

Place in atring

on

Calculate offset

on

Add it to <HL>

-

Copy across

Now the day

-

ony

Now the hours/mins/secs

More?

-

DRIVE ROUTINES FOR THE GEMINI GM822

oO1B8’ O1BA* o1Be’ O1BF o1c2’

o1c3’ o1c4’ orcs" o1c6’ o1c7’ otce’ o1egt o1cBt O1cE o1cF’

opi! ope" o1D3’ o1D5’ o1p8’ o1D9’ OmDA’ o1De’ o1DD’ O10" O1H2’

O1E3’ O1n4’ O1B5’ O1E6’ O1BT’ O18"

0159" O1BA’ O1EB’ O1EC’

20 ED ai cD cg

TE BT cs 23 5F B5 OE cD BA 18

O7

OT OT 80 cg

AT OT 80 cg

Fs AO 0090" o1c3"

02 0005

30 O1n3’ 30

o1gg’ 03

; Print

PRINT:

*

RHE

PLSTRG +

RHEE

es

TIME10O:

TIMES:

3 Y€

oR LDI LD CALL RET

RIC MODULE

NZ, HMS

HL, HOURS

PRINT

the string

LD OR RET INC LD PUSH LD CALL POP JR

LD INC SUB CALL LD LD SUB ADD CALL SUB RET

HREERER

RLCA LD RLCA RLCA ADD RET

LD RLCA ADD RET

A, (HL) A

Z

HL ELA HL

M--80

on on am

an ee

ro

c, Conour

BDOS HL PRINT

Get place in string

A, (HL) HL 30H TIMEIO BA

A, (HL) 30H A,B TIMES 3

BA

A,B

B,A

A,B

HER

ae am em em em

ane ee

14 Sep 1982 14:48 PAGE 1-5 Yes, so loop Copy across the tenths

Now display it Done

Get the byte Done?

Save <HL>

SHEE

JE CHIH HEI IHE HEHEHE BE IEE IHR III Multiplication routines

SEE

HEE HEERREREI

Multiply by 2 Save the partial product Multiply by 2 again +. and again Add the partial product

Save the partial product Multiply by 2 Add the partial product


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











Page 38 of 51