diff level1/modules/dwwrite.asm @ 3246:be3446f758ca

Updated dwread.asm and dwwrite.asm so that the 6551 routines could have specially defined flags so that some of the addresses could be overridden by the make files if needed.
author David Ladd <drencor-xeen@users.sourceforge.net>
date Sun, 11 Mar 2018 01:30:30 -0600
parents a47ee8f14eb8
children
line wrap: on
line diff
--- a/level1/modules/dwwrite.asm	Fri Mar 09 13:43:06 2018 -0600
+++ b/level1/modules/dwwrite.asm	Sun Mar 11 01:30:30 2018 -0600
@@ -34,20 +34,35 @@
           IFNDEF    SY6551B
 SY6551B   EQU       $FF68             ; Set base address for future use
           ENDC
+          IFNDEF    SYDATA
+SYDATA    EQU       SY6551B
+          ENDC
+          IFNDEF    SYCONT
+SYCONT    EQU       SY6551B+3
+          ENDC
+          IFNDEF    SYCOMM
+SYCOMM    EQU       SY6551B+2
+          ENDC
+          IFNDEF    SYSTAT
+SYSTAT    EQU       SY6551B+1
+          ENDC
+          IFNDEF    SYCONSET
+SYCONSET  EQU       $10               ; Default baud rate 115200
+          ENDC
 DWWrite   pshs      d,cc              ; preserve registers
           IFEQ      NOINTMASK
           orcc      #IntMasks         ; mask interrupts
           ENDC
-          lda       #$10              ; Set baud to 115K
-          sta       SY6551B+3         ; write the info to register
+          lda       #SYCONSET         ; Set baud to value of SYCONSET
+          sta       SYCONT            ; write the info to register
           lda       #$0B              ; Set no parity, no irq
-          sta       SY6551B+2         ; write the info to register
+          sta       SYCOMM            ; write the info to register
 txByte
-          lda       SY6551B+1         ; read status register to check
+          lda       SYSTAT            ; read status register to check
           anda      #$10              ; if transmit buffer is empty
           beq       txByte            ; if not loop back and check again
           lda       ,x+               ; load byte from buffer
-          sta       SY6551B           ; and write it to data register
+          sta       SYDATA            ; and write it to data register
           leay      -1,y              ; decrement byte counter
           bne       txByte            ; loop if more to send
           puls      cc,d,pc           ; restore registers and return