New _randomize() function, do some cleanup on apple2.inc
git-svn-id: svn://svn.cc65.org/cc65/trunk@1496 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
f708a05d61
commit
2f3f1df00f
3 changed files with 88 additions and 56 deletions
|
@ -25,6 +25,7 @@ S_OBJS= _scrsize.o \
|
|||
ctype.o \
|
||||
cvline.o \
|
||||
kbhit.o \
|
||||
randomize.o \
|
||||
read.o \
|
||||
revers.o \
|
||||
where.o \
|
||||
|
|
|
@ -1,22 +1,7 @@
|
|||
; Break vector
|
||||
BRKVec = $03F0
|
||||
|
||||
; Goto Dos
|
||||
RESTOR = $03D0
|
||||
;-----------------------------------------------------------------------------
|
||||
; Zero page stuff
|
||||
|
||||
; Soft switches
|
||||
;
|
||||
; write to USEROM to enable apple rom C000-CFFF
|
||||
USEROM = $C007
|
||||
; 80 column card switches
|
||||
C80ON = $C00C
|
||||
C80OFF = $C00D
|
||||
RD80COL = $C01F
|
||||
PG2OFF = $C054
|
||||
PG2ON = $C055
|
||||
RDPAGE2 = $C01C
|
||||
|
||||
; Text routines
|
||||
MIN_X = $20
|
||||
MAX_X = $21
|
||||
MIN_Y = $22
|
||||
|
@ -25,10 +10,31 @@ CH = $24
|
|||
CV = $25
|
||||
BASL = $28
|
||||
TEXTTYP = $32
|
||||
RNDL = $4E ; Random value, low byte
|
||||
RNDH = $4F ; Random value, high byte
|
||||
MEMSIZE = $73 ; Highest free RAM location
|
||||
HOME = $FC58
|
||||
VTABZ = $FC24
|
||||
COUT = $FDED
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
; Vectors
|
||||
|
||||
BRKVec = $03F0 ; Break vector
|
||||
RESTOR = $03D0 ; Goto Dos
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
; Hardware
|
||||
|
||||
; Soft switches
|
||||
;
|
||||
; Write to USEROM to enable apple rom C000-CFFF
|
||||
USEROM = $C007
|
||||
|
||||
; 80 column card switches
|
||||
C80ON = $C00C
|
||||
C80OFF = $C00D
|
||||
RD80COL = $C01F
|
||||
PG2OFF = $C054
|
||||
PG2ON = $C055
|
||||
RDPAGE2 = $C01C
|
||||
|
||||
; Keyboard entries
|
||||
RDKEY = $FD0C
|
||||
|
@ -39,8 +45,16 @@ KEY_STROBE = $C000
|
|||
OPEN_APPLE = $C061
|
||||
CLOSED_APPLE = $C062
|
||||
|
||||
;-----------------------------------------------------------------------------
|
||||
; ROM routines
|
||||
|
||||
; Text output and helpers
|
||||
HOME = $FC58
|
||||
VTABZ = $FC24
|
||||
COUT = $FDED
|
||||
|
||||
; Graphics entry points, by cbmnut (applenut??) cbmnut@hushmail.com
|
||||
WHITE = $01 ;white for $1c, I think...
|
||||
WHITE = $01 ; White for $1c, I think...
|
||||
|
||||
COLOR = $1C ; Current plot color
|
||||
|
||||
|
|
17
libsrc/apple2/randomize.s
Normal file
17
libsrc/apple2/randomize.s
Normal file
|
@ -0,0 +1,17 @@
|
|||
;
|
||||
; Ullrich von Bassewitz, 07.11.2002
|
||||
;
|
||||
; void _randomize (void);
|
||||
; /* Initialize the random number generator */
|
||||
;
|
||||
|
||||
.export __randomize
|
||||
.import _srand
|
||||
|
||||
.include "apple2.inc"
|
||||
|
||||
__randomize:
|
||||
ldx RNDH ; Use random value supplied by ROM
|
||||
lda RNDL
|
||||
jmp _srand ; Initialize generator
|
||||
|
Loading…
Add table
Reference in a new issue