documentation

This commit is contained in:
Michael Specht 2018-02-16 18:44:27 +01:00
parent d9a7cdafd1
commit 6dd792fed0
9 changed files with 4 additions and 3 deletions

View File

@ -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)

View File

@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -16,6 +16,7 @@ LOOP TAY
LSR
STA FOO
TYA
CLC
ADC FOO ; @Au(post)
DEX ; @Xu(post) @Au,FOO(post)
BNE LOOP