80-Bus News

  

November-December 1982, Volume 1, Issue 4











Page 39 of 51











DRIVE ROUTINES FOR THE GEMINI GM822 RTC MODULE

OLED’ O1FO" OFS’ o1n4’ O1F6" o1Fs’ OFA’ O1FD’ 0200’ 0203" 0205" 0207’ O20A’ 0208" o20c’ o20F’ o2ti’ 0213" 0216" 0218" o21A’ O21B’ 021D’ O21F* 0222" 0225" 0228 0224" o22D’ 0230’ 0233" 0235’ 0237" 0239" 0238" 0238"

0238" 0243’ 0246! 0249" O24A’ o24c’ o24F’ 0251"

cD cD AF 16 1B OE cp 21

11

ED ED 3A 12 13 2i

ED ED 2i

ED ED 23 ED ED cD ai

cD OB cD 21

cD 35 16 1E OB cD C9

ED 34

3A BT 28 cD 30 ai

OOFO’ OOoF9’

BO 40 1D o121’ o08B O2BB’

AO 008

0088

AQ 0082 AO AO

AO AO o15t’ ooe6c’ o1cc3" 01 0005 oosD’ orcs! o4

EE 45

o12i’

73 O2cT"

02D9" 0080

oD 0261’ 08 0088 *

PE

am eR en ow

SET: CALL CALL XOR LD LD LD CALL LD LD LDI LDI LD LD INC LD LDI LDI LD LDI LDI INC LDI LDI CALL LD CALL

CALL RET

HEE

on ee aw

RTC: LD LD LD OR JR CALL JR LD

RICi:

Set RIC from ASCII values at ARGS eee Arguments are in the form HH:MM DD:MM.D ‘*#HF

Read mA Set RIC to f from console

M-80 14 Sep 1982 14:48 PAGE 1-6

RHE

INDATA

ITNADDR

A

D, TEST+NOSTRB E, TEST+WRSTRB C, PADDR

WRITE

HL, IMONTH

DE, WSPACE

Get PIOs out of reset state

oo

Set non test mode

Get the month across ... «++ to the register workspace

eA en

A, (IDYWK)

(DE) A : DE

HL, IDAY

Get day of the week

wn

an

Now the day

HL, [HOURS Now the hours ...

on

HL «ee and the mins

on

WRRTC

HL, STMES

PRINT

c, CONIN

BDOS

HL, CRLF

PRINT

AA

D, START+NOSTRB E, START+WRSTRB C, PADDR

WRITE

Write out the work space Wait for a key press ...

an ee

eee to start Start the RIC

on on

(STK), SP } Save the stack SP, STACK

A, (ARGS-2) 3 Any ARGS given? A

4,RTC2

VALID ; Yes, get and validate input NC,RTC2

HL, ERMES ; Error, so tell ‘em

DRIVE ROUTINES FOR THE GEMINI

0254" 0257’ 0259’ o2sc’ 0260

0261’ 0264’ 0267’ O26A’ 026c" o26D’ O26F" 0272" 0275" 0278’ 0278" o27c’ 027E* 0280’ 0281"

0282" 0283’ 0286’ 0288" 02489" 0288" o28p’ 0285 O28F’ 0291 ‘ 0293’ 0294" 0295’ 0296" 0298" 0294" 029B’ 0290 o29n’ 02A0’ O2Ai’ O2A2" O2A3’

O2A5’ O2A6’

cD 18 cD BD cg

21 cep 2i 36

OE cD 21 cD 21 TE FE 20 AF cg

EB a4 06 1A FE 38 BE 23 39 D6 12 13 1A FE 38 BE 23 30 D6 12 13 13 10

4A FE

o1c3’ CALL F3 JR o16c’ REC2: CALL 7B O2cT’ LD RET

EEE

ae ee

-*-

0000" VALID: LD o1c3’ CALL 9080 LD 19 LD EX OA LD 0005 CALL oosp’ LD o1c3’ CALL 0082 LD LD 54 cp 02 JR XOR RET

ae ee

ALID(: EX OOAE’ LD 04 LD VALID2: LD 30 cp 25 JR cp INC 24 oR 30 SUB LD INC LD 30 cP 18 aR cP INC 14 oR 30 SUB LD INC INC B3 DINZ 3 Do the day of LD 30 cP

GMB22 RTC MODULE

PRINT REC1 TIME

sp, (STK)

Get and validate input HEH

HL, TTLMES PRINT

HL, ARGS-2 (HL), 25 DE, HL

C, LININ BDOS

HL, CRLF PRINT

HL, ARGS A, CHL) ‘pt

NZ, VALID1 A

DE, HL HL, INVAL B,4

A, (DE) ‘gt

C, BRR (HL)

HL

NC, ERR 30H

M-80 14 Sep 1982 14:48 PAGE 1-7

Else, read clock Get the stack back Back to CP/M

ae se ee

3; Put up the caption

3; Put the max string length at ARGS

ro

Point to the input buffer

Get the input

Test for time

-

No, so validate input Yes, so clear any <C> flag Done

an New

Validate the input string, and convert to nibbles Do hours and mins, then days and months, then day of week

Point to ARGS in <DED> Point to validation table Do it 4 times

Get the input

Test if leas than O ...

em am an am ow

$ se. Ov greater than (HL) : Point to next (HL) for next time

Ok so convert to BCD nibble

(8), A; Put it back in workspace

1h (DE) ‘ot

C, BRR (HL) HL

NC, ERR 30H (DE),A DE

DE VALID2 the week, A, (DE) ‘ot

3 Point to next input ... 3 «ee and do it all again

3; Skip the interdigit gap

3 More ? same as before


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











Page 39 of 51