Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
elenderg committed Oct 23, 2023
1 parent 8d0f772 commit 7dfbe2a
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 32 deletions.
2 changes: 2 additions & 0 deletions recursos/Algoritmos de Exemplo/CAL-4700/Box's area/box's area
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Write the area then " square inches" below the box.
Refresh the screen.
Wait for the escape key.

An Area is a number.

To get a box and an area:
Make the box 4 inches by 2 inches.
Put the box's area into the area.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
To draw a spiral starting with some twips;
To draw a spiral given a size:
Privatize the size.
Loop.
Draw a half circle given the size.
Divide the size by 2.
Add 1 to a count. If the count is 5, break.
Repeat.

To clear the screen with a color:
Draw the screen's box with the color and the color.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Start up.
Clear the screen with the tan color. Use the dark brown pen.
Turn right 7/12 of the way around. Move up 1/2 inch.
Loop.
Draw a Koch Snowflake given 4 inches and 3.
Draw a Koch Snowflake given 4 inches and 4.
Turn right 1/3 of the way around.
Add 1 to a count. If the count is 3, break.
Repeat.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Start up.
Clear the screen with the tan color. Use the dark brown pen.
Start 4 inches to the left and 3-1/2 inches down from the screen's center.
Turn right 1/12 of the way around.
Draw a nested triangle Triangle starting with 8 inches.
Draw a nested triangle Triangle starting with 16 inches.
Wait for the escape key.
Shut down.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Move the little box to the top left corner of the big box.
Loop.
Add 1 to a number. If the number is greater than 100, break.
Use the white pen.
If the number is not divisible by 2 and 3 and 5, add 1 to a count; use the red pen..
If the number is not divisible by 2 and 3 and 5, add 1 to a count; use the red pen.
Draw the number in the little box with the color.
Move the little box right 1/2 inch. If the little box is still in the big box, repeat.
Move the little box to the left of the big box.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@
To pick a random number between a min number and a max number:
Put the seed's whereabouts into eax.
Intel $8BC8. \ mov ecx,eax \ calculate zero based max
Intel $8B8510000000. \ mov eax,[ebp+16]
Intel $8B00. \ mov eax,[eax] \ dereference
Intel $8B9D0C000000. \ mov ebx,[ebp+12]
Intel $2B03. \ sub eax,[ebx]
Intel $40. \ inc eax \ adjust randseed
Intel $691105840808. \ imul edx,[ecx],134775813
Intel $42. \ inc edx
Intel $8911. \ mov [ecx],edx
Intel $F7E2. \ mul edx
Intel $0313. \ add edx,[ebx] the min
Intel $8B9D08000000. \ mov ebx,[ebp+08]
Intel $8913. \ mov [ebx],edx
Put the random number into the context's number.

To run:
Start up.
Clear the screen using the tan color.
Clear the screen.
Make a box 2 inches by 2 inches.
Center the box on the screen. Move the box left 5 inches.
Fill and label the box with random spots stopping at 100.
Expand All @@ -43,7 +27,3 @@ If a counter is past the number, break.
Repeat.
Write the number under the box.
Refresh the screen.

To pick a spot anywhere in a box:
Pick the spot's x between the box's left and the box's right.
Pick the spot's y between the box's top and the box's bottom.

0 comments on commit 7dfbe2a

Please sign in to comment.