Skip to content

Commit

Permalink
moved to using OS version of randomA
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkamprath committed Jul 13, 2023
1 parent 992725c commit 0cb1168
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions examples/slu4-minimal-64/software/random-maze.min64
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,10 @@ RIGHT_WALL_CHAR = $1F
init:
ldi 0xfe sta 0xffff ; initialize stack pointer
ldi 0 sta _char_buffer+1 ; initialize char buffer terminator
; Initialize the random number generator
phsi $42
phsi 42
phsi 2
jps init_random8
pls pls pls
phs2i _start_maze_str jps _Print pls2
start:
; get a random 8-bit number, place in register A
phsi 0 jps random8 pls
jps _Random
; see if random value in A LSB is 1
lsr bcs .right_wall
.left_wall:
Expand All @@ -40,5 +34,3 @@ start:

_char_buffer: .zero 2
_start_maze_str: .cstr 'Random Maze!\n'

#include "mathlib.min64"

0 comments on commit 0cb1168

Please sign in to comment.