]> git.sur5r.net Git - cc65/commitdiff
Added library reference ser_libref to SER interface.
authorOliver Schmidt <ol.sc@web.de>
Sat, 1 Jun 2013 09:03:14 +0000 (11:03 +0200)
committerOliver Schmidt <ol.sc@web.de>
Sat, 1 Jun 2013 09:03:14 +0000 (11:03 +0200)
18 files changed:
asminc/ser-kernel.inc
libsrc/apple2/libref.s
libsrc/apple2/ser/a2.ssc.s
libsrc/atmos/libref.s
libsrc/atmos/ser/atmos-acia.s
libsrc/c128/libref.s
libsrc/c128/ser/c128-swlink.s
libsrc/c64/libref.s
libsrc/c64/ser/c64-swlink.s
libsrc/cbm510/libref.s
libsrc/cbm510/ser/cbm510-std.s
libsrc/cbm610/libref.s
libsrc/cbm610/ser/cbm610-std.s
libsrc/lynx/libref.s
libsrc/lynx/ser/lynx-comlynx.s
libsrc/plus4/libref.s
libsrc/plus4/ser/plus4-stdser.s
libsrc/serial/ser-kernel.s

index 7fc5bf9c299f48d06d8367dfc3c672f6cba86d3f..fff9b14401aadcb145a8dd1e7a163418a96038c9 100644 (file)
 .struct SER_HDR
         ID      .byte   3       ; Contains 0x73, 0x65, 0x72 ("ser")
         VERSION .byte   1       ; Interface version
+        LIBREF  .addr           ; Library reference
         JUMPTAB .struct
-            INSTALL     .word   ; INSTALL routine
-            UNINSTALL   .word   ; UNINSTALL routine
-            OPEN        .word   ; OPEN routine
-            CLOSE       .word   ; CLOSE routine
-            GET         .word   ; GET routine
-            PUT         .word   ; PUT routine
-            STATUS      .word   ; STATUS routine
-            IOCTL       .word   ; IOCTL routine
-            IRQ         .word   ; IRQ routine
+            INSTALL     .addr   ; INSTALL routine
+            UNINSTALL   .addr   ; UNINSTALL routine
+            OPEN        .addr   ; OPEN routine
+            CLOSE       .addr   ; CLOSE routine
+            GET         .addr   ; GET routine
+            PUT         .addr   ; PUT routine
+            STATUS      .addr   ; STATUS routine
+            IOCTL       .addr   ; IOCTL routine
+            IRQ         .addr   ; IRQ routine
         .endstruct
 .endstruct
 
@@ -56,7 +57,7 @@
 ;------------------------------------------------------------------------------
 ; The SER API version, stored SER_HDR::VERSION
 
-SER_API_VERSION         = $00
+SER_API_VERSION         = $01
 
 ;------------------------------------------------------------------------------
 ; ser_params
index 09bdb057c867ad5b930d98aac6e5cf6570234af2..898a92f18f689907d48da29b69f43515a647c67a 100644 (file)
@@ -2,9 +2,10 @@
 ; Oliver Schmidt, 2013-05-31
 ;
 
-        .export         em_libref, joy_libref, mouse_libref
+        .export         em_libref, joy_libref, mouse_libref, ser_libref
         .import         _exit
 
 em_libref       := _exit
 joy_libref      := _exit
 mouse_libref    := _exit
+ser_libref      := _exit
index 37450563887b08d257dc076474182e3d251f0b4e..19deefd39acaad2072f3ddb21c2629d81a782bb9 100644 (file)
         .byte   $73, $65, $72           ; "ser"
         .byte   SER_API_VERSION         ; Serial API version number
 
-        ; Jump table.
+        ; Library reference
+        .addr   $0000
+
+        ; Jump table
         .addr   INSTALL
         .addr   UNINSTALL
         .addr   OPEN
index e4afa7eb1840d599ac8ee47d047d1e3a006c512f..0bda1e7e8a31fcb256e8e6cdfd2d9928611aba90 100644 (file)
@@ -2,7 +2,8 @@
 ; Oliver Schmidt, 2013-05-31
 ;
 
-        .export         joy_libref
+        .export         joy_libref, ser_libref
         .import         _exit
 
 joy_libref      := _exit
+ser_libref      := _exit
index 36071c32accb675ef0205b254eda9e0dbbf4b9a8..9d742bf66e324fda0d749acd3734dcc549b2cf5d 100644 (file)
         .byte   $73, $65, $72           ; "ser"
         .byte   SER_API_VERSION         ; Serial API version number
 
-        ; Jump table.
+        ; Library reference
+        .addr   $0000
+
+        ; Jump table
         .addr   INSTALL
         .addr   UNINSTALL
         .addr   OPEN
index 09bdb057c867ad5b930d98aac6e5cf6570234af2..898a92f18f689907d48da29b69f43515a647c67a 100644 (file)
@@ -2,9 +2,10 @@
 ; Oliver Schmidt, 2013-05-31
 ;
 
-        .export         em_libref, joy_libref, mouse_libref
+        .export         em_libref, joy_libref, mouse_libref, ser_libref
         .import         _exit
 
 em_libref       := _exit
 joy_libref      := _exit
 mouse_libref    := _exit
+ser_libref      := _exit
index 347452e852d00dc690021982f333ffa23b93f139..02336d6886162e2a46d8e2533630d1a8b518449b 100644 (file)
         .byte   $73, $65, $72           ; "ser"
         .byte   SER_API_VERSION         ; Serial API version number
 
-; Jump table.
+; Library reference
+
+        .addr   $0000
+
+; Jump table
 
         .word   INSTALL
         .word   UNINSTALL
index 09bdb057c867ad5b930d98aac6e5cf6570234af2..898a92f18f689907d48da29b69f43515a647c67a 100644 (file)
@@ -2,9 +2,10 @@
 ; Oliver Schmidt, 2013-05-31
 ;
 
-        .export         em_libref, joy_libref, mouse_libref
+        .export         em_libref, joy_libref, mouse_libref, ser_libref
         .import         _exit
 
 em_libref       := _exit
 joy_libref      := _exit
 mouse_libref    := _exit
+ser_libref      := _exit
index f9121b8b67ef2b807ddf8e173593c16b970e373e..d95e63d9cc7ae2e9ba178e455595af3a8c04e4f2 100644 (file)
         .byte   $73, $65, $72           ; "ser"
         .byte   SER_API_VERSION         ; Serial API version number
 
-; Jump table.
+; Library reference
+
+        .addr   $0000
+
+; Jump table
 
         .word   INSTALL
         .word   UNINSTALL
index 933eb59111704297253e229ff5a3411d04b1dc01..515c62d191444ed9c3f121232b52095dafbe96db 100644 (file)
@@ -2,8 +2,9 @@
 ; Oliver Schmidt, 2013-05-31
 ;
 
-        .export         em_libref, joy_libref
+        .export         em_libref, joy_libref, ser_libref
         .import         _exit
 
 em_libref       := _exit
 joy_libref      := _exit
+ser_libref      := _exit
index 9b721bd4139cde08f42becbc7299eb673e2778e0..be17a027be1bcd029cb00ea2cf7a40f3235aecec 100644 (file)
         .byte   $73, $65, $72           ; "ser"
         .byte   SER_API_VERSION         ; Serial API version number
 
-; Jump table.
+; Library reference
+
+        .addr   $0000
+
+; Jump table
 
         .word   INSTALL
         .word   UNINSTALL
index 507c9887b5cbf7db429f471f67f324e7da9d01d0..9c6994a5d562fd4541a5626733839d0bac9bdf21 100644 (file)
@@ -2,7 +2,8 @@
 ; Oliver Schmidt, 2013-05-31
 ;
 
-        .export         em_libref
+        .export         em_libref, ser_libref
         .import         _exit
 
 em_libref       := _exit
+ser_libref      := _exit
index 671698a2801c8b0f34c1d5bd052331c59e7c2f5e..2d090bf4160ec74097b7feca07e5aae8dddf6604 100644 (file)
         .byte   $73, $65, $72           ; "ser"
         .byte   SER_API_VERSION         ; Serial API version number
 
-; Jump table.
+; Library reference
+
+        .addr   $0000
+
+; Jump table
 
         .word   INSTALL
         .word   UNINSTALL
index e4afa7eb1840d599ac8ee47d047d1e3a006c512f..0bda1e7e8a31fcb256e8e6cdfd2d9928611aba90 100644 (file)
@@ -2,7 +2,8 @@
 ; Oliver Schmidt, 2013-05-31
 ;
 
-        .export         joy_libref
+        .export         joy_libref, ser_libref
         .import         _exit
 
 joy_libref      := _exit
+ser_libref      := _exit
index 7035787c95003e5d87eb72cefa54946fdf798f8d..acd91a999c519a8ccb8377776cd9b4e98039e5b3 100644 (file)
         .byte   $73, $65, $72           ; "ser"
         .byte   SER_API_VERSION         ; Serial API version number
 
-        ; Jump table.
+        ; Library reference
+        .addr   $0000
+
+        ; Jump table
         .addr   INSTALL
         .addr   UNINSTALL
         .addr   OPEN
index e4afa7eb1840d599ac8ee47d047d1e3a006c512f..0bda1e7e8a31fcb256e8e6cdfd2d9928611aba90 100644 (file)
@@ -2,7 +2,8 @@
 ; Oliver Schmidt, 2013-05-31
 ;
 
-        .export         joy_libref
+        .export         joy_libref, ser_libref
         .import         _exit
 
 joy_libref      := _exit
+ser_libref      := _exit
index ed33aa8c7316d951b18bf5e15c17d6949830fc7b..86377b89c462ae21e58f9b013dd7e1342819fdce 100644 (file)
         .byte   $73, $65, $72           ; "ser"
         .byte   SER_API_VERSION         ; Serial API version number
 
-; Jump table.
+; Library reference
+
+        .addr   $0000
+
+; Jump table
 
         .word   INSTALL
         .word   UNINSTALL
index 7a91e5e4b426bfd23358abbef3f4969a96adf6af..438189edb68b28070791ee3b8e58ff8d1e2376d4 100644 (file)
@@ -4,7 +4,7 @@
 ; Common functions of the serial drivers
 ;
 
-        .import         return0
+        .import         return0, ser_libref
         .importzp       ptr1
         .interruptor    ser_irq, 29     ; Export as high priority IRQ handler
 
@@ -58,6 +58,15 @@ _ser_install:
         dey
         bpl     @L0
 
+; Set the library reference
+
+        ldy     #SER_HDR::LIBREF
+        lda     #<ser_libref
+        sta     (ptr1),y
+        iny
+        lda     #>ser_libref
+        sta     (ptr1),y
+
 ; Copy the jump vectors
 
         ldy     #SER_HDR::JUMPTAB