; unsigned char __fastcall__ set_chameleon_speed (unsigned char speed);
;
;/* Set the speed of the Chameleon cartridge, the following inputs
-; * are accepted:
+; * are accepted:
; * SPEED_SLOW : 1 Mhz mode
; * SPEED_1X : 1 Mhz mode
; * SPEED_2X : 2 Mhz mode
; Done
-done: rts
+done: rts
; ------------------------------------------------------------------------
; COPYFROM: Copy from extended into linear memory. A pointer to a structure
COPYFROM:
sta ptr3
stx ptr3+1 ; Save the passed em_copy pointer
-
+
ldy #EM_COPY::OFFS
lda (ptr3),y
sta ptr1
; ------------------------------------------------------------------------
; USE: Tell the driver that the window is now associated with a given page.
-
+
USE: sta curpage
stx curpage+1 ; Remember the page
lda #<window
_mouse_stddrv: .asciiz "c64-1351.mou"
-
.include "c64.inc"
-__randomize:
+__randomize:
ldx VIC_HLINE ; Use VIC rasterline as high byte
lda TIME+2 ; Use 60HZ clock as low byte
jmp _srand ; Initialize generator
; machine
.asciiz "Commodore 64"
-
-
_cclear:
cmp #0 ; Is the length zero?
beq L9 ; Jump if done
- sta tmp1
+ sta tmp1
L1: lda #$20 ; Blank - screen code
jsr cputdirect ; Direct output
dec tmp1
.include "dir.inc"
.include "errno.inc"
.include "zeropage.inc"
-
+
.import pushax
.import _read
;
.export _gotox
- .import plot
+ .import plot
.importzp CURS_X
_gotox: sta CURS_X ; Set new position
jmp plot ; And activate it
-
-
.export screensize
.import SCREEN
-
- screensize = SCREEN
+ screensize = SCREEN
;
; OPEN kernal call.
;
-; NOTE: The OPEN system call in the CBM610 kernal is different from the
+; NOTE: The OPEN system call in the CBM610 kernal is different from the
; standard. It evaluates the carry flag and does a normal open if carry clear
; and some strange things (output sa 15 + name on IEC) if carry set. To be
-; compatible with our CBM file stuff, we have to clear the carry before
+; compatible with our CBM file stuff, we have to clear the carry before
; calling the real OPEN.
.export OPEN
.endproc
-
-
;
; udtim routine for the 610. We will not check for the stop key here, since
; C programs will not use it.
-;
+;
.export UDTIM
.import time: zp
.export screensize
.import SCREEN
-
- screensize = SCREEN
+ screensize = SCREEN
;
; OPEN kernal call.
;
-; NOTE: The OPEN system call in the CBM610 kernal is different from the
+; NOTE: The OPEN system call in the CBM610 kernal is different from the
; standard. It evaluates the carry flag and does a normal open if carry clear
; and some strange things (output sa 15 + name on IEC) if carry set. To be
-; compatible with our CBM file stuff, we have to clear the carry before
+; compatible with our CBM file stuff, we have to clear the carry before
; calling the real OPEN.
.export OPEN
.endproc
-
-
.import sys_bank, restore_bank
.import sysp0: zp, ktmp: zp
-
+
.include "cbm610.inc"
.proc SETNAM
.endproc
-
-
;
; udtim routine for the 610. We will not check for the stop key here, since
; C programs will not use it.
-;
+;
.export UDTIM
.import time: zp
.import _srand
.importzp time
-__randomize:
+__randomize:
ldx time+2 ; Use 50/60HZ clock
lda time+1
jmp _srand ; Initialize generator
.proc CLOSE
-
+
ldx PET_DETECT
cpx #PET_4000
bne @L1
.endproc
-
;
.export RDTIM
-
+
.include "pet.inc"
.endproc
-
stx DEVNUM ; Device address
sty SECADR ; Secondary address
rts
-
-.endproc
+.endproc
.proc SETNAM
-
+
sta FNLEN
stx FNADR
sty FNADR+1
.endproc
-
.include "pet.inc"
-__randomize:
+__randomize:
ldx TIME+2
lda TIME+1 ; Use 60HZ clock
jmp _srand ; Initialize generator
-; Break handler, called if a break occurs.
+; Break handler, called if a break occurs.
.proc brk_handler
.endproc
-
; Done
-done: rts
+done: rts
; ------------------------------------------------------------------------
; COPYFROM: Copy from extended into linear memory. A pointer to a structure
COPYFROM:
sta ptr3
stx ptr3+1 ; Save the passed em_copy pointer
-
+
ldy #EM_COPY::OFFS
lda (ptr3),y
sta ptr1
.proc PLOT
- bcs @L1
+ bcs @L1
jsr $FFF0 ; Set cursor position
jmp $EAB2 ; Set pointer to color RAM
.endproc
-
inx
cmp term
bne argloop
-
+
; We've found the end of the argument. X points one character behind it, and
; A contains the terminating character. To make the argument a valid C string,
; replace the terminating character by a zero.