]> git.sur5r.net Git - cc65/blobdiff - libsrc/apple2/mcbdefault.s
don't use constructor to setup runtime stack
[cc65] / libsrc / apple2 / mcbdefault.s
index f270f9d70e9ee92fc5601caf94ecefe0e632dbf3..c7c51a5761e7603392d3934ea293336424323718 100644 (file)
@@ -7,9 +7,6 @@
 ; be called from an interrupt handler
 ;
 
-       .ifdef  __APPLE2ENH__
-       .constructor    initmcb
-       .endif
        .export         _mouse_def_callbacks
        
        .include        "apple2.inc"
@@ -31,24 +28,16 @@ _mouse_def_callbacks:
        .addr   movex
        .addr   movey
 
-; ------------------------------------------------------------------------
-
-       .segment        "INIT"
-
-       .ifdef  __APPLE2ENH__
-initmcb:
-       lda     ALTCHARSET      ; Alternate charset switched in?
-       bpl     :+              ; No, normal charset
-       lda     #'B'            ; MouseText character
-       sta     cmpcur+1
-       sta     getcur+1
-:      rts
-       .endif
-
 ; ------------------------------------------------------------------------
 
        .data
 
+        .ifdef __APPLE2ENH__
+cursor = 'B'                    ; MouseText character
+        .else
+cursor = '+' | $40              ; Flashing crosshair
+        .endif
+
 getcursor:
         .ifdef  __APPLE2ENH__
         bit     RD80VID         ; In 80 column mode?
@@ -57,11 +46,11 @@ switch:     bit     LOWSCR          ; Patched at runtime
         .endif
 column:        ldx     #$00            ; Patched at runtime
 getscr:        lda     $0400,x         ; Patched at runtime
-cmpcur:        cmp     #'+' | $40      ; Possibly patched by initialization
+        cmp    #cursor
        rts
 
 setcursor:
-getcur:        lda     #'+' | $40      ; Possibly patched by initialization
+        lda    #cursor
 setscr:        sta     $0400,x         ; Patched at runtime
        .ifdef  __APPLE2ENH__
         bit    LOWSCR          ; Doesn't hurt in 40 column mode