Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkamprath committed Aug 14, 2023
1 parent 295ff46 commit 000dbc9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
4 changes: 2 additions & 2 deletions examples/slu4-minimal-64/software/mandelbrot16.min64
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ IMAGE_Y_PIXELS = 240
SCALE_BITS = 9
SCALE_FACTOR = (1 << SCALE_BITS)

MANDELBROT_START_X = -2*SCALE_FACTOR
MANDELBROT_END_X = 1*SCALE_FACTOR
MANDELBROT_START_X = -175*SCALE_FACTOR/100
MANDELBROT_END_X = 125*SCALE_FACTOR/100
MANDELBROT_STEP_X = (MANDELBROT_END_X - MANDELBROT_START_X)/IMAGE_X_PIXELS

MANDELBROT_START_Y = -1*SCALE_FACTOR
Expand Down
12 changes: 2 additions & 10 deletions examples/slu4-minimal-64/software/stringlib.min64
Original file line number Diff line number Diff line change
Expand Up @@ -172,16 +172,8 @@ int32_to_decimal_cstr:
; first determine if value is signed, remember stack is in big endian
lds 1 ani %10000000 sta .is_signed
cpi 0 beq .cacluate_str
; it is negative, take 2's by first doing 1's then adding 1
lds 1 not sts 1
lds 2 not sts 2
lds 3 not sts 3
lds 4 not sts 4
; now add 1, remember stack is in big endian
lds 4 adi 1 sts 4
lds 3 aci 0 sts 3
lds 2 aci 0 sts 2
lds 1 aci 0 sts 1
; it is negative, take 2's
twos4s 1
.cacluate_str:
jps uint32_to_decimal_cstr
pls4 ; remove pushed value
Expand Down

0 comments on commit 000dbc9

Please sign in to comment.