1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-26 08:32:00 +00:00

Introduced the notion of a standard serial driver.

There's no target with more than one serial driver (and I don't see that change anytime soon) so it's a no-brainer to apply the standard driver concept to serial drivers.
This commit is contained in:
Oliver Schmidt 2022-12-22 18:06:16 +01:00
parent d9ebfa7192
commit d90c7e9853
28 changed files with 274 additions and 11 deletions

View File

@ -171,7 +171,7 @@ extern struct {
extern void a2_auxmem_emd[];
extern void a2_stdjoy_joy[]; /* Referred to by joy_static_stddrv[] */
extern void a2_stdmou_mou[]; /* Referred to by mouse_static_stddrv[] */
extern void a2_ssc_ser[];
extern void a2_ssc_ser[]; /* Referred to by ser_static_stddrv[] */
extern void a2_hi_tgi[]; /* Referred to by tgi_static_stddrv[] */
extern void a2_lo_tgi[];
#endif

View File

@ -99,7 +99,7 @@
extern void a2e_auxmem_emd[];
extern void a2e_stdjoy_joy[]; /* Referred to by joy_static_stddrv[] */
extern void a2e_stdmou_mou[]; /* Referred to by mouse_static_stddrv[] */
extern void a2e_ssc_ser[];
extern void a2e_ssc_ser[]; /* Referred to by ser_static_stddrv[] */
extern void a2e_hi_tgi[]; /* Referred to by tgi_static_stddrv[] */
extern void a2e_lo_tgi[];

View File

@ -261,7 +261,7 @@ extern void atrst_mou[]; /* referred to by mouse_static_stddrv[]
extern void atrami_mou[];
extern void atrtrk_mou[];
extern void atrtt_mou[];
extern void atrrdev_ser[];
extern void atrrdev_ser[]; /* referred to by ser_static_stddrv[] */
extern void atr3_tgi[];
extern void atr4_tgi[];
extern void atr5_tgi[];
@ -286,7 +286,7 @@ extern void atrxst_mou[]; /* referred to by mouse_static_stddrv[]
extern void atrxami_mou[];
extern void atrxtrk_mou[];
extern void atrxtt_mou[];
extern void atrxrdev_ser[];
extern void atrxrdev_ser[]; /* referred to by ser_static_stddrv[] */
extern void atrx3_tgi[];
extern void atrx4_tgi[];
extern void atrx5_tgi[];

View File

@ -133,7 +133,7 @@
/* The addresses of the static drivers */
extern void atmos_pase_joy[]; /* Referred to by joy_static_stddrv[] */
extern void atmos_ijk_joy[];
extern void atmos_acia_ser[];
extern void atmos_acia_ser[]; /* Referred to by ser_static_stddrv[] */
extern void atmos_228_200_3_tgi[];
extern void atmos_240_200_2_tgi[]; /* Referred to by tgi_static_stddrv[] */

View File

@ -140,7 +140,7 @@ extern void c128_1351_mou[]; /* Referred to by mouse_static_stddrv[] */
extern void c128_joy_mou[];
extern void c128_inkwell_mou[];
extern void c128_pot_mou[];
extern void c128_swlink_ser[];
extern void c128_swlink_ser[]; /* Referred to by ser_static_stddrv[] */
extern void c128_hi_tgi[];
extern void c128_vdc_tgi[]; /* Referred to by tgi_static_stddrv[] */
extern void c128_vdc2_tgi[];

View File

@ -155,7 +155,7 @@ extern void c64_1351_mou[]; /* Referred to by mouse_static_stddrv[]
extern void c64_joy_mou[];
extern void c64_inkwell_mou[];
extern void c64_pot_mou[];
extern void c64_swlink_ser[];
extern void c64_swlink_ser[]; /* Referred to by ser_static_stddrv[] */
extern void c64_hi_tgi[]; /* Referred to by tgi_static_stddrv[] */

View File

@ -128,7 +128,7 @@ extern void cbm510_inkwl_mou[];
extern void cbm510_joy_mou[]; /* Referred to by mouse_static_stddrv[] */
extern void cbm510_ram_emd[];
extern void cbm510_std_joy[]; /* Referred to by joy_static_stddrv[] */
extern void cbm510_std_ser[];
extern void cbm510_std_ser[]; /* Referred to by ser_static_stddrv[] */

View File

@ -105,7 +105,7 @@
/* The addresses of the static drivers */
extern void cbm610_ram_emd[];
extern void cbm610_std_ser[];
extern void cbm610_std_ser[]; /* Referred to by ser_static_stddrv[] */

View File

@ -115,7 +115,7 @@
/* The addresses of the static drivers */
extern void lynx_stdjoy_joy[]; /* Referred to by joy_static_stddrv[] */
extern void lynx_comlynx_ser[];
extern void lynx_comlynx_ser[]; /* Referred to by ser_static_stddrv[] */
extern void lynx_160_102_16_tgi[]; /* Referred to by tgi_static_stddrv[] */

View File

@ -56,7 +56,7 @@
/* The addresses of the static drivers */
extern void plus4_stdjoy_joy[]; /* Referred to by joy_static_stddrv[] */
extern void plus4_stdser_ser[];
extern void plus4_stdser_ser[]; /* Referred to by ser_static_stddrv[] */

View File

@ -123,6 +123,13 @@ struct ser_params {
unsigned char handshake; /* Type of handshake to use */
};
/* The name of the standard serial driver for a platform */
extern const char ser_stddrv[];
/* The address of the static standard serial driver for a platform */
extern const void ser_static_stddrv[];
/*****************************************************************************/
/* Code */

View File

@ -0,0 +1,22 @@
;
; Address of the static standard serial driver
;
; Oliver Schmidt, 2022-12-22
;
; const void ser_static_stddrv[];
;
.export _ser_static_stddrv
.ifdef __APPLE2ENH__
.import _a2e_ssc_ser
.else
.import _a2_ssc_ser
.endif
.rodata
.ifdef __APPLE2ENH__
_ser_static_stddrv := _a2e_ssc_ser
.else
_ser_static_stddrv := _a2_ssc_ser
.endif

View File

@ -0,0 +1,18 @@
;
; Name of the standard serial driver
;
; Oliver Schmidt, 2022-12-22
;
; const char ser_stddrv[];
;
.export _ser_stddrv
.rodata
_ser_stddrv:
.ifdef __APPLE2ENH__
.asciiz "A2E.SSC.SER"
.else
.asciiz "A2.SSC.SER"
.endif

View File

@ -0,0 +1,22 @@
;
; Address of the static standard serial driver
;
; Oliver Schmidt, 2022-12-22
;
; const void ser_static_stddrv[];
;
.export _ser_static_stddrv
.ifdef __ATARIXL__
.import _atrxrdev_ser
.else
.import _atrrdev_ser
.endif
.rodata
.ifdef __ATARIXL__
_ser_static_stddrv := _atrxrdev_ser
.else
_ser_static_stddrv := _atrrdev_ser
.endif

18
libsrc/atari/ser_stddrv.s Normal file
View File

@ -0,0 +1,18 @@
;
; Name of the standard serial driver
;
; Oliver Schmidt, 2022-12-22
;
; const char ser_stddrv[];
;
.export _ser_stddrv
.rodata
_ser_stddrv:
.ifdef __ATARIXL__
.asciiz "atrxrdev.ser"
.else
.asciiz "atrrdev.ser"
.endif

View File

@ -0,0 +1,14 @@
;
; Address of the static standard serial driver
;
; Oliver Schmidt, 2022-12-22
;
; const void ser_static_stddrv[];
;
.export _ser_static_stddrv
.import _atmos_acia_ser
.rodata
_ser_static_stddrv := _atmos_acia_ser

13
libsrc/atmos/ser_stddrv.s Normal file
View File

@ -0,0 +1,13 @@
;
; Name of the standard serial driver
;
; Oliver Schmidt, 2022-12-22
;
; const char ser_stddrv[];
;
.export _ser_stddrv
.rodata
_ser_stddrv: .asciiz "atmos-acia.ser"

View File

@ -0,0 +1,14 @@
;
; Address of the static standard serial driver
;
; Oliver Schmidt, 2022-12-22
;
; const void ser_static_stddrv[];
;
.export _ser_static_stddrv
.import _c128_swlink_ser
.rodata
_ser_static_stddrv := _c128_swlink_ser

13
libsrc/c128/ser_stddrv.s Normal file
View File

@ -0,0 +1,13 @@
;
; Name of the standard serial driver
;
; Oliver Schmidt, 2022-12-22
;
; const char ser_stddrv[];
;
.export _ser_stddrv
.rodata
_ser_stddrv: .asciiz "c128_swlink.ser"

View File

@ -0,0 +1,14 @@
;
; Address of the static standard serial driver
;
; Oliver Schmidt, 2022-12-22
;
; const void ser_static_stddrv[];
;
.export _ser_static_stddrv
.import _c64_swlink_ser
.rodata
_ser_static_stddrv := _c64_swlink_ser

13
libsrc/c64/ser_stddrv.s Normal file
View File

@ -0,0 +1,13 @@
;
; Name of the standard serial driver
;
; Oliver Schmidt, 2022-12-22
;
; const char ser_stddrv[];
;
.export _ser_stddrv
.rodata
_ser_stddrv: .asciiz "c64_swlink.ser"

View File

@ -0,0 +1,14 @@
;
; Address of the static standard serial driver
;
; Oliver Schmidt, 2022-12-22
;
; const void ser_static_stddrv[];
;
.export _ser_static_stddrv
.import _cbm510_std_ser
.rodata
_ser_static_stddrv := _cbm510_std_ser

View File

@ -0,0 +1,13 @@
;
; Name of the standard serial driver
;
; Oliver Schmidt, 2022-12-22
;
; const char ser_stddrv[];
;
.export _ser_stddrv
.rodata
_ser_stddrv: .asciiz "cbm510-std.ser"

View File

@ -0,0 +1,14 @@
;
; Address of the static standard serial driver
;
; Oliver Schmidt, 2022-12-22
;
; const void ser_static_stddrv[];
;
.export _ser_static_stddrv
.import _cbm610_std_ser
.rodata
_ser_static_stddrv := _cbm610_std_ser

View File

@ -0,0 +1,13 @@
;
; Name of the standard serial driver
;
; Oliver Schmidt, 2022-12-22
;
; const char ser_stddrv[];
;
.export _ser_stddrv
.rodata
_ser_stddrv: .asciiz "cbm610-std.ser"

View File

@ -0,0 +1,14 @@
;
; Address of the static standard serial driver
;
; Oliver Schmidt, 2022-12-22
;
; const void ser_static_stddrv[];
;
.export _ser_static_stddrv
.import _lynx_comlynx_ser
.rodata
_ser_static_stddrv := _lynx_comlynx_ser

View File

@ -0,0 +1,14 @@
;
; Address of the static standard serial driver
;
; Oliver Schmidt, 2022-12-22
;
; const void ser_static_stddrv[];
;
.export _ser_static_stddrv
.import _plus4_stdser_ser
.rodata
_ser_static_stddrv := _plus4_stdser_ser

13
libsrc/plus4/ser_stddrv.s Normal file
View File

@ -0,0 +1,13 @@
;
; Name of the standard serial driver
;
; Oliver Schmidt, 2022-12-22
;
; const char ser_stddrv[];
;
.export _ser_stddrv
.rodata
_ser_stddrv: .asciiz "plus4-stdser.ser"