]> git.sur5r.net Git - cc65/commitdiff
Removed initialization code to set the screen size and replaced it by a
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 23 Nov 2000 19:05:32 +0000 (19:05 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Thu, 23 Nov 2000 19:05:32 +0000 (19:05 +0000)
separate module that contains a module constructor. In some cases, the
code was even unnecessary, since the screen size is known in advance.

git-svn-id: svn://svn.cc65.org/cc65/trunk@476 b7a2c559-68d2-44c3-8de9-860c34a00d81

26 files changed:
libsrc/apple2/Makefile
libsrc/apple2/_scrsize.s [new file with mode: 0644]
libsrc/atari/Makefile
libsrc/atari/_scrsize.s [new file with mode: 0644]
libsrc/atari/conio.s [deleted file]
libsrc/atari/crt0.s
libsrc/c128/Makefile
libsrc/c128/_scrsize.s [new file with mode: 0644]
libsrc/c128/conio.s
libsrc/c64/Makefile
libsrc/c64/_scrsize.s [new file with mode: 0644]
libsrc/c64/conio.s
libsrc/c64/crt0.s
libsrc/cbm610/Makefile
libsrc/cbm610/_scrsize.s [new file with mode: 0644]
libsrc/cbm610/conio.s [deleted file]
libsrc/cbm610/crt0.s
libsrc/conio/Makefile
libsrc/conio/_scrsize.s [deleted file]
libsrc/pet/Makefile
libsrc/pet/_scrsize.s [new file with mode: 0644]
libsrc/pet/conio.s
libsrc/pet/crt0.s
libsrc/plus4/Makefile
libsrc/plus4/_scrsize.s [new file with mode: 0644]
libsrc/plus4/conio.s

index 17813f44d592a29a2bc6bd07347aa7bb83561cae..e7f847426c0aee6b8d9c47c47350a664a1a831c5 100644 (file)
 
 C_OBJS =
 
-S_OBJS = break.o clrscr.o cclear.o cgetc.o chline.o color.o \
-        cputc.o crt0.o ctype.o \
-        cvline.o kbhit.o read.o revers.o where.o write.o
+S_OBJS=        _scrsize.o      \
+       break.o         \
+       cclear.o        \
+       cgetc.o         \
+       chline.o        \
+       clrscr.o        \
+       color.o         \
+       cputc.o         \
+       crt0.o          \
+       ctype.o         \
+       cvline.o        \
+       kbhit.o         \
+       read.o          \
+       revers.o        \
+       where.o         \
+       write.o
 
 all:   $(C_OBJS) $(S_OBJS)
 
 clean:
        @rm -f $(C_OBJS:.c=.s) $(C_OBJS) $(S_OBJS) crt0.o
 
+
diff --git a/libsrc/apple2/_scrsize.s b/libsrc/apple2/_scrsize.s
new file mode 100644 (file)
index 0000000..5578c1b
--- /dev/null
@@ -0,0 +1,15 @@
+;
+; Ullrich von Bassewitz, 26.10.2000
+;
+; Screen size variables
+;
+
+       .export         xsize, ysize
+
+.rodata
+
+xsize:         .byte   40
+ysize: .byte   24
+
+
+
index bc8dfd80ee1540c118ece2df7d03aa69d5962325..5fd5461be50a2667ee853a431af26095a58e48e9 100644 (file)
@@ -16,7 +16,7 @@ ATARIDEFS = -DNUMDRVS=4
 
 C_OBJS =
 
-S_OBJS = crt0.o kbhit.o conio.o clrscr.o cputc.o ctype.o chline.o cvline.o \
+S_OBJS = crt0.o _scrsize.o kbhit.o clrscr.o cputc.o ctype.o chline.o cvline.o \
         color.o gotoxy.o cclear.o revers.o readjoy.o break.o where.o write.o \
         gotox.o gotoy.o savevec.o rwcommon.o cgetc.o read.o getargs.o close.o \
         open.o oserror.o fdtable.o setcolor.o scroll.o mul40.o graphuse.o \
diff --git a/libsrc/atari/_scrsize.s b/libsrc/atari/_scrsize.s
new file mode 100644 (file)
index 0000000..5578c1b
--- /dev/null
@@ -0,0 +1,15 @@
+;
+; Ullrich von Bassewitz, 26.10.2000
+;
+; Screen size variables
+;
+
+       .export         xsize, ysize
+
+.rodata
+
+xsize:         .byte   40
+ysize: .byte   24
+
+
+
diff --git a/libsrc/atari/conio.s b/libsrc/atari/conio.s
deleted file mode 100644 (file)
index 651d0e5..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-;
-; Christian Groessler
-;
-; Low level stuff for screen output/console input
-;
-
-       .export         initconio
-       .import         xsize, ysize, plot
-
-       .include        "atari.inc"
-
-.code
-
-initconio:
-       ldx     #40
-       ldy     #24
-       stx     xsize
-       sty     ysize
-       rts
-
index 3937f0fb077c0f79083fbefc759bb939b370d04b..f311f5d2669cdc3ab20c238062640d9529e8a7bd 100644 (file)
@@ -15,9 +15,9 @@ RESERVE_MOUSE_MEMORY  = 1     ; for P/M
        .export         mouse_pm0
 .endif
        .export         _exit
-       .import         getargs, argc, argv       
+       .import         getargs, argc, argv
        .import         initlib, donelib
-               .import         initconio, zerobss, pushax
+               .import         zerobss, pushax
        .import         _main,__filetab,getfd
        .import         __CODE_LOAD__, __BSS_LOAD__
        .import         __graphmode_used
@@ -124,8 +124,6 @@ L1: lda     sp,x
 
 ; Initialize conio stuff
 
-       jsr     initconio
-
        lda     #$FF
        sta     CH
 
index 2ae36d8818c6f5d33441ac659eea263ca578aaed..f54fd107d4fabd0a52d4000d7e681148f5558c44 100644 (file)
 %.o:   %.s
        @$(AS) -g -o $@ $(AFLAGS) $<
 
-C_OBJS =
-
-S_OBJS = crt0.o conio.o kbhit.o clrscr.o cgetc.o readjoy.o\
-        color.o cputc.o break.o
-
-all:   $(C_OBJS) $(S_OBJS)
+OBJS = _scrsize.o      \
+       break.o         \
+       cgetc.o         \
+               clrscr.o        \
+       conio.o         \
+       crt0.o          \
+               color.o         \
+       cputc.o         \
+       kbhit.o         \
+       readjoy.o
+
+all:           $(OBJS)
 
 clean:
-       @rm -f $(C_OBJS:.c=.s) $(C_OBJS) $(S_OBJS) crt0.o
+       @rm -f $(OBJS)
 
diff --git a/libsrc/c128/_scrsize.s b/libsrc/c128/_scrsize.s
new file mode 100644 (file)
index 0000000..d377be7
--- /dev/null
@@ -0,0 +1,29 @@
+;
+; Ullrich von Bassewitz, 26.10.2000
+;
+; Screen size variables
+;
+
+       .export         xsize, ysize
+       .constructor    initscrsize
+
+       .include        "../cbm/cbm.inc"
+
+.code
+
+initscrsize:
+       jsr     SCREEN
+       inx
+       stx     xsize
+       iny
+       sty     ysize
+       rts
+
+.bss
+
+xsize:         .res    1
+ysize: .res    1
+
+
+
+                
index 481b4e7b418a00ff78de5e0a611189351c59776e..fddbd863259767bfc06fc4bd0ea2e12e9b35bc2b 100644 (file)
@@ -18,11 +18,6 @@ keyvec:      .res    2
 .code
 
 initconio:
-       jsr     SCREEN
-       inx
-       stx     xsize
-       iny
-       sty     ysize
 
 ; Save the old vector
 
index 5a69bdfed26db0c93eefe2f7d23ca0bdea0846df..528930ac88b673ce9aea2b6965fb18c45b0d9202 100644 (file)
 %.o:   %.s
        @$(AS) -g -o $@ $(AFLAGS) $<
 
-C_OBJS =
-
-S_OBJS = crt0.o read.o write.o kbhit.o conio.o clrscr.o mouse.o\
-        cputc.o cgetc.o color.o readjoy.o break.o rs232.o
-
-all:   $(C_OBJS) $(S_OBJS)
+OBJS = _scrsize.o      \
+       break.o         \
+       crt0.o          \
+       cgetc.o         \
+       clrscr.o        \
+       color.o         \
+       conio.o         \
+       cputc.o         \
+       kbhit.o         \
+       mouse.o         \
+       read.o          \
+       readjoy.o       \
+       rs232.o         \
+       write.o
+
+all:   $(OBJS)
 
 clean:
-       @rm -f $(C_OBJS:.c=.s) $(C_OBJS) $(S_OBJS) crt0.o
+       @rm -f $(OBJS)
 
diff --git a/libsrc/c64/_scrsize.s b/libsrc/c64/_scrsize.s
new file mode 100644 (file)
index 0000000..749226d
--- /dev/null
@@ -0,0 +1,25 @@
+;
+; Ullrich von Bassewitz, 26.10.2000
+;
+; Screen size variables
+;
+
+       .export         xsize, ysize
+       .constructor    initscrsize
+
+       .include        "../cbm/cbm.inc"
+
+.code
+
+initscrsize:
+       jsr     SCREEN
+       stx     xsize
+       sty     ysize
+       rts
+
+.bss
+
+xsize:         .res    1
+ysize: .res    1
+
+
index f822c945defb3af9ef16a584840f543cd857d18e..0e3f97947eed0aec5827d0b1d8472beaf50e4484 100644 (file)
@@ -4,20 +4,7 @@
 ; Low level stuff for screen output/console input
 ;
 
-       .export         initconio
        .exportzp       CURS_X, CURS_Y
-       .import         xsize, ysize
 
-       .include        "../cbm/cbm.inc"
        .include        "c64.inc"
 
-.code
-
-initconio:
-       jsr     SCREEN
-       stx     xsize
-       sty     ysize
-       rts
-
-
-
index 3f57be7ae804d7da077259b79b47d7f98d2baad6..a6cee8c2237768559c4b4d74d7f300842af20111 100644 (file)
@@ -6,7 +6,7 @@
 
        .export         _exit
        .import         initlib, donelib
-               .import         initconio, zerobss, push0
+               .import         zerobss, push0
        .import         _main
 
        .include        "c64.inc"
@@ -94,10 +94,6 @@ L1:  lda     sp,x
 
        jsr     initlib
 
-; Initialize conio stuff
-
-       jsr     initconio
-
 ; Pass an empty command line
 
                jsr     push0           ; argc
index 1077641ebc7f0bb8339ef7bfb17752ae6895af6e..ea51689c802c939fd8527dad1355a502405b2d27 100644 (file)
 %.o:   %.s
        @$(AS) -g -o $@ $(AFLAGS) $<
 
-C_OBJS =
-
-S_OBJS = crt0.o kbhit.o conio.o clrscr.o cputc.o cgetc.o\
-        color.o break.o banking.o crtc.o pokesys.o\
-        kscnkey.o kplot.o kudtim.o kirq.o rs232.o
-
-all:   $(C_OBJS) $(S_OBJS)
+OBJS = _scrsize.o      \
+       banking.o       \
+               break.o         \
+               cgetc.o         \
+       clrscr.o        \
+               color.o         \
+               cputc.o         \
+               crt0.o          \
+               crtc.o          \
+               kbhit.o         \
+               kirq.o          \
+               kplot.o         \
+       kscnkey.o       \
+       kudtim.o        \
+       pokesys.o       \
+       rs232.o
+
+all:   $(OBJS)
 
 clean:
-       @rm -f $(C_OBJS:.c=.s) $(C_OBJS) $(S_OBJS) crt0.o
+       @rm -f $(OBJS)
 
diff --git a/libsrc/cbm610/_scrsize.s b/libsrc/cbm610/_scrsize.s
new file mode 100644 (file)
index 0000000..f7095af
--- /dev/null
@@ -0,0 +1,15 @@
+;
+; Ullrich von Bassewitz, 26.10.2000
+;
+; Screen size variables
+;
+
+       .export         xsize, ysize
+
+.rodata
+
+xsize:         .byte   80
+ysize: .byte   25
+
+
+
diff --git a/libsrc/cbm610/conio.s b/libsrc/cbm610/conio.s
deleted file mode 100644 (file)
index c1c58ef..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-;
-; Ullrich von Bassewitz, 22.09.1998
-;
-; Low level stuff for screen output/console input
-;
-
-       .export         initconio
-       .import         xsize, ysize
-
-       .include        "cbm610.inc"
-
-initconio:
-       lda     #80
-       sta     xsize
-       lda     #25
-       sta     ysize
-       rts
-
-
index 3c18b6bf4bbc18c47518e8a80e1641c3a35da5a6..d41746e2a06836e6b1d7834313da0d934e32cf53 100644 (file)
@@ -7,7 +7,6 @@
        .export         _exit
        .import         initlib, donelib
        .import         push0, _main
-       .import         initconio
        .import         __BSS_RUN__, __BSS_SIZE__
        .import         irq, nmi
                .import         k_irq, k_nmi, k_plot, k_udtim, k_scnkey
@@ -240,10 +239,6 @@ Z4:
 
        jsr     initlib
 
-; Initialize conio stuff
-
-       jsr     initconio
-
 ; Create the (empty) command line for the program
 
                jsr     push0           ; argc
index 77152a86fa90d4da587c514df1177ff38c9b4a23..6b2262371523b4244c1ea6759c9838c404716f0b 100644 (file)
 %.o:   %.s
        @$(AS) -g -o $@ $(AFLAGS) $<
 
-C_OBJS =
+OBJS = _cursor.o       \
+       cputhex.o       \
+       cputs.o         \
+       cursor.o        \
+       scrsize.o
 
-S_OBJS = _cursor.o     \
-        _scrsize.o     \
-        cputhex.o      \
-        cputs.o        \
-        cursor.o       \
-        scrsize.o
-
-all:   $(C_OBJS) $(S_OBJS)
+all:   $(OBJS)
 
 clean:
-       @rm -f *~ $(C_OBJS:.o=.s) $(C_OBJS) $(S_OBJS)
+       @rm -f *~ $(OBJS)
diff --git a/libsrc/conio/_scrsize.s b/libsrc/conio/_scrsize.s
deleted file mode 100644 (file)
index 743a888..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-;
-; Ullrich von Bassewitz, 26.10.2000
-;
-; Screen size variables
-;
-
-       .export         xsize, ysize
-
-.bss
-
-xsize: .res    1
-ysize: .res    1
-
-
-
index 2f3d280ffb1c2bc714d3739e8e0639061c9e380c..49a578629b634b262df23cf904632dbefe58052c 100644 (file)
 %.o:   %.s
        @$(AS) -g -o $@ $(AFLAGS) $<
 
-C_OBJS =
+OBJS = _scrsize.o      \
+       break.o         \
+       cgetc.o         \
+       clrscr.o        \
+       color.o         \
+       conio.o         \
+       cputc.o         \
+       crt0.o          \
+       kbhit.o
 
-S_OBJS = crt0.o kbhit.o conio.o clrscr.o cputc.o cgetc.o break.o color.o
-
-all:   $(C_OBJS) $(S_OBJS)
+all:   $(OBJS)
 
 clean:
-       @rm -f $(C_OBJS:.c=.s) $(C_OBJS) $(S_OBJS) crt0.o
+       @rm -f $(OBJS)
diff --git a/libsrc/pet/_scrsize.s b/libsrc/pet/_scrsize.s
new file mode 100644 (file)
index 0000000..09c9418
--- /dev/null
@@ -0,0 +1,30 @@
+;
+; Ullrich von Bassewitz, 26.10.2000
+;
+; Screen size variables
+;
+
+
+       .export         xsize, ysize
+               .constructor    initscrsize
+
+       .include        "pet.inc"
+
+.code
+
+initscrsize:
+               ldx     SCR_LINELEN
+       inx                     ; Variable is one less
+               stx     xsize
+       lda     #25
+       sta     ysize
+       rts
+
+
+.bss
+
+xsize:         .res    1
+ysize: .res    1
+
+
+
index 19e7533338ce916e4466929fbefe2b997d059ba0..45ae54d74de1f49516839026d6510b436ae5858b 100644 (file)
@@ -4,21 +4,7 @@
 ; Low level stuff for screen output/console input
 ;
 
-       .export         initconio
-       .import         xsize, ysize
        .exportzp       CURS_X, CURS_Y
 
        .include        "pet.inc"
 
-.code
-
-initconio:
-               ldx     SCR_LINELEN
-       inx                     ; Variable is one less
-               stx     xsize
-       lda     #25
-       sta     ysize
-       rts
-
-
-
index 24ed2691de064af78acf7b9f050edbe36b71131b..5d4ac73329e2aafc86ac84a4719b859ddabbb9c0 100644 (file)
@@ -4,9 +4,9 @@
 ; This must be the *first* file on the linker command line
 ;
 
-       .export         _exit                    
+       .export         _exit
        .import         initlib, donelib
-               .import         initconio, zerobss, push0
+               .import         zerobss, push0
        .import         _main
 
        .include        "pet.inc"
@@ -89,10 +89,6 @@ L1:  lda     sp,x
 
        jsr     initlib
 
-; Initialize conio stuff
-
-       jsr     initconio
-
 ; Pass an empty command line
 
        jsr     push0           ; argc
index 46bc1dd0aab07c7dbdc2a4da6cca0f553bec970a..6ab65b68680828ca553eb9c42832350a3e97f8d7 100644 (file)
 %.o:   %.s
        @$(AS) -g -o $@ $(AFLAGS) $<
 
-C_OBJS =
-
-S_OBJS = crt0.o kbhit.o conio.o clrscr.o cputc.o cgetc.o\
-        color.o readjoy.o break.o
-
-all:   $(C_OBJS) $(S_OBJS)
+OBJS = _scrsize.o      \
+       break.o         \
+               cgetc.o         \
+       clrscr.o        \
+       color.o         \
+       conio.o         \
+       cputc.o         \
+       crt0.o          \
+       kbhit.o         \
+       readjoy.o
+
+all:   $(OBJS)
 
 clean:
-       @rm -f $(C_OBJS:.c=.s) $(C_OBJS) $(S_OBJS) crt0.o
+       @rm -f $(OBJS) 
 
diff --git a/libsrc/plus4/_scrsize.s b/libsrc/plus4/_scrsize.s
new file mode 100644 (file)
index 0000000..749226d
--- /dev/null
@@ -0,0 +1,25 @@
+;
+; Ullrich von Bassewitz, 26.10.2000
+;
+; Screen size variables
+;
+
+       .export         xsize, ysize
+       .constructor    initscrsize
+
+       .include        "../cbm/cbm.inc"
+
+.code
+
+initscrsize:
+       jsr     SCREEN
+       stx     xsize
+       sty     ysize
+       rts
+
+.bss
+
+xsize:         .res    1
+ysize: .res    1
+
+
index 11d5307f6b66c5692a2680bea4da5b6e2583f021..d6f2531116f65d1f2f2db7544aea0ad725a2c819 100644 (file)
@@ -14,9 +14,6 @@
 .code
 
 initconio:
-       jsr     SCREEN
-       stx     xsize
-       sty     ysize
        ldy     #15
 L1:    lda     fnkeys,y
        sta     FKEY_SPACE,y