[A86] Random #'s on ROM 1.3


[Prev][Index][Thread]

[A86] Random #'s on ROM 1.3



Has anyone noticed that this random # generator will not work on ROM version 
1.3, I know It works on 1.6, and probably others.

#include ti86asm.inc
.org $D748
    xor  a              ;lower value (0)
    call _SetXXOP1      ;OP1=0
    ld   a,$A               ;upper value
    call _SetXXOP2      ;OP2=10
    call _randint       ;OP1=random number between 0 and 9
    call _convOP1       ;a=OP1 (random number)
    add  a,'0'          ;convert to ascii format
    call _putc          ;display character stored in a
    ret                 ;return from routine
.end

Josh Gentry
"Real programmers code in pen during math class."
http://www.freewebz.com/jdgentry