view level1/modules/clock2_jvemu.asm @ 3277:33d539c123cf

d64: Add mb.ddisk script for making Dragon boot floppy At least it works in XRoar when running off a 80d floppy and preparing a new 40d boot floppy in the second drive. The "format" must be run manually for now since there is not enough memory to run it from inside the script...
author Tormod Volden <debian.tormod@gmail.com>
date Sat, 07 Mar 2020 23:15:05 +0100
parents f389c6bca482
children
line wrap: on
line source

********************************************************************
* Clock2 - Jeff Vavasour CoCo 3 Emulator RTC Driver
*
* $Id$
*
* Edt/Rev  YYYY/MM/DD  Modified by
* Comment
* ------------------------------------------------------------------
*          2004/07/13  Robert Gault
* Added Vavasour/Collyer emulator & MESS (Disto) versions and relocated
* 'GetTime equ'   statement so it is not within a chip heading.
*
*          2004/07/31  Rodney Hamilton
* Improved RTCJVEmu code, conditionalized RTC type comments.
*
*   1      2004/08/18  Boisy G. Pitre
* Separated clock2 modules for source clarity.

         nam   Clock2
         ttl   Jeff Vavasour CoCo 3 Emulator RTC Driver

         ifp1            
         use   defsfile  
         endc            

tylg     set   Sbrtn+Objct
atrv     set   ReEnt+rev
rev      set   $00
edition  set   1

RTC.Base equ   $FFC0

         mod   eom,name,tylg,atrv,JmpTable,RTC.Base

name     fcs   "Clock2"
         fcb   edition

JmpTable                 
         rts
         nop             
         nop             
         bra   GetTime   
         nop             
         rts

GetTime  ldx   #RTC.Base
         ldd   ,x	get year (CCYY)
         suba  #20
         bmi   yr1	19xx, OK as is
yr0      addb  #100	20xx adjustment
         deca		also check for
         bpl   yr0	21xx (optional)
yr1      stb   <D.Year	set year (~YY)
         ldd   2,x	get date
         std   <D.Month	set date (MMDD)
         IFNE  Level-1
         ldd   4,x	get time (wwhh)
         sta   <D.Daywk	set day of week
         ELSE
         ldb   5,x	get hour (hh)
         ENDC
         stb   <D.Hour	set hour (hh)
         ldd   6,x	get time (mmss)
         std   <D.Min	set time (mmss)
         rts

         emod            
eom      equ   *         
         end