changeset 3230:604865c524be

Fixed level1 vtio.asm so that level1/GrfDrv properly gets loaded into memory if previously not loaded.
author David Ladd <drencor-xeen@users.sourceforge.net>
date Wed, 07 Feb 2018 16:52:32 -0600
parents 7ee7d0c31787
children 90999af719fc
files level1/modules/vtio.asm
diffstat 1 files changed, 17 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/level1/modules/vtio.asm	Wed Jan 31 23:13:05 2018 -0600
+++ b/level1/modules/vtio.asm	Wed Feb 07 16:52:32 2018 -0600
@@ -30,6 +30,11 @@
 *
 *   1      2005/11/26  Boisy G. Pitre
 * Renamed to VTIO.
+*
+*   2      2018/02/07  David Ladd
+*                      L. Curtis Boyle
+* Updated GoGrfo to load GrfDrv if GrfDrv was not found in memory
+* using a new load routine called LoadSub
                          
          nam   VTIO      
          ttl   OS-9 Level One V2 CoCo I/O driver
@@ -621,8 +626,10 @@
                          
 CallCO   leax  <V.GrfDrvE,u get base pointer to CO-entries
          pshs  a         
+         tsta            Is it GrfDrv we are trying to init?
+         beq   IsGrfDrv
          lbsr  GetModOffset ; Get offset
-         ldx   a,x        get pointer to CoVDG/CoWP
+IsGrfDrv ldx   a,x        get pointer to CoVDG/CoWP
          puls  a         
          beq   NoIOMod    branch if no module
          lda   <V.WrChr,u get character to write
@@ -701,6 +708,7 @@
 CoWP     fcs   /CoWP/    
 CoHR     fcs   /CoHR/
 Co42     fcs   /Co42/    
+CoVGA    fcs   /CoVGA/
                          
 * GetStat
 *
@@ -1050,6 +1058,12 @@
          os9   F$Link    
          puls  pc,u      
                          
+* Load subroutine
+LoadSub  pshs  u         
+         lda   #Systm+Objct
+         os9   F$Load    
+         puls  pc,u      
+                         
 * 128x192 4 color pixel table
 Mode1Clr fdb   $0055,$aaff
                          
@@ -1084,10 +1098,11 @@
          ldx   <V.GrfDrvE,u get GrfDrv entry point
          bne   L0681      branch if not zero
          pshs  y,a        else preserve regs
-         bne   L067F     
          leax  >GrfDrv,pcr  get pointer to name string
          bsr   LinkSub    link to GrfDrv
          bcc   L067B      branch if ok
+         bsr   LoadSub
+         bcc   L067B
          puls  pc,y,a     else exit with error
 L067B    sty   <V.GrfDrvE,u save module entry pointer
 L067F    puls  y,a        restore regs