RANDOM-BUT-DECIMAL -------------------------------------------------------------------------------------------------- TOOL: ML-MONITOR {Commodore C128 buil-in EDITOR & ASSEMBLER} Language: Assembler Extra: - Author: Misel Zivanovic Note: (C) 22nd FEB 2026 - www.lived.ch, mzretro.ch --------------------------------------------------------------------------------------------------- This routine will show you random numbers between 0-15 as decimal values. To see a range between 0-255 just change the and #$0f to and #$ff After so many examples, guess it is not necessary any longer to explain everything from scratch each time. Meaning, you sure know by now what to do with this here! . 01300 a9 14 lda #$14 . 01302 a9 00 lda #$00 . 01304 8d 00 ff sta $ff00 . 01307 20 42 c1 jsr $c142 . 0130a 20 34 13 jsr $1334 . 0130d 85 60 sta $60 . 0130f a9 00 lda #$00 . 01311 85 61 sta $61 . 01313 85 62 sta $62 . 01315 20 b4 b8 jsr $b8b4 . 01318 20 07 ba jsr $ba07 . 0131b a9 00 lda #$00 . 0131d a2 08 ldx #$08 . 0131f a0 03 ldy #$03 . 01321 20 5d ba jsr $ba5d . 01324 ce 01 13 dec $1301 . 01327 ad 01 13 lda $1301 . 0132a c9 00 cmp #$00 . 0132c d0 dc bne $130a . 0132e a9 14 lda #$14 . 01330 8d 01 13 sta $1301 . 01333 60 rts . 01334 a9 ff lda #$ff . 01336 8d 0e d4 sta $d40e . 01339 8d 0f d4 sta $d40f . 0133c a9 80 lda #$80 . 0133e 8d 12 d4 sta $d412 . 01341 ad 1b d4 lda $d41b . 01344 29 0f and #$0f . 01346 60 rts . 01347 m 1300 1347 >01300 a9 14 a9 00 8d 00 ff 20:I.I...? >01308 42 c1 20 34 13 85 60 a9:bA 4..?I >01310 00 85 61 85 62 20 b4 b8:..A.B TX >01318 20 07 ba a9 00 a2 08 a0: .ZI.B.? >01320 03 20 5d ba ce 01 13 ad:. ]ZN..M >01328 01 13 c9 00 d0 dc a9 14:..I.P?I. >01330 8d 01 13 60 a9 ff 8d 0e:...?I?.. >01338 d4 8d 0f d4 a9 80 8d 12:T..TI... >01340 d4 ad 1b d4 29 0f 60 00:TM.T).?.