documentation
@ -133,7 +133,7 @@ LOOP TAY
|
||||
BNE LOOP
|
||||
```
|
||||
|
||||
This is a small program which lets the accumulator grow quadratically while X decreases linearly:
|
||||
This is a small program which lets the accumulator grow exponentially while X decreases linearly:
|
||||
|
||||
![A at PC 0x6012](doc/example03_1.gif?raw=true)
|
||||
![X at PC 0x6015](doc/example03_2.gif?raw=true)
|
||||
|
4
champ.rb
@ -424,7 +424,7 @@ class Champ
|
||||
x = (x * canvas_width) / 255 + canvas_left
|
||||
normalized_value = (value.to_f / histogram_x_max * 31).to_i
|
||||
(0..normalized_value).each do |dy|
|
||||
pixels[(canvas_top - dy - 4) * width + x] = normalized_value + 0x40
|
||||
pixels[(canvas_top - dy - 4) * width + x] = normalized_value - dy + 0x40
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -432,7 +432,7 @@ class Champ
|
||||
y = ((y ^ 0xff) * canvas_height) / 255 + canvas_top
|
||||
normalized_value = (value.to_f / histogram_y_max * 31).to_i
|
||||
(0..normalized_value).each do |dx|
|
||||
pixels[y * width + canvas_left + canvas_width + dx + 4] |= normalized_value + 0x40
|
||||
pixels[y * width + canvas_left + canvas_width + dx + 4] |= normalized_value - dx + 0x40
|
||||
end
|
||||
end
|
||||
|
||||
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 3.0 KiB |
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 4.0 KiB |
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 5.5 KiB |
@ -16,6 +16,7 @@ LOOP TAY
|
||||
LSR
|
||||
STA FOO
|
||||
TYA
|
||||
CLC
|
||||
ADC FOO ; @Au(post)
|
||||
DEX ; @Xu(post) @Au,FOO(post)
|
||||
BNE LOOP
|
||||
|