Re: A86: Random


[Prev][Next][Index][Thread]

Re: A86: Random



I know a way to get a random number from OP1to OP2.
Here's how:
_randint  equ  $5544
_dispOP1  equ  $515b
_setxxOP1  equ  $4613
_setxxOP2  equ  $4617
.org _asm_exec_ram
 
    ld a,0                  ;load a,0
    call _setxxOP1   ;load OP1,0
    ld a,99                ;load a,99
    call _setxxOP2   ;load OP2,99
    call _randint       ;find a random integer between OP1 and OP 2
    ;this next call displays the random number but you can use a routine to compare OP to 
    ;something else
    call _dispOP1
.end
 
Jbrett
tbarwick@esn.net