Last active
May 1, 2022 23:32
-
-
Save badlogic/07cfe6828a92fe4ea13bd770dbc25be4 to your computer and use it in GitHub Desktop.
Revisions
-
badlogic revised this gist
May 1, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ loop: rand r1 mulf r1, 255, r1 f2i r1, r1 or r1, 0xff000000, r1 push r1 call _gfx_clear call _gfx_show -
badlogic revised this gist
May 1, 2022 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,7 @@ loop: rand r1 mulf r1, 255, r1 f2i r1, r1 and r1, 0xff000000, r1 push r1 call _gfx_clear call _gfx_show -
badlogic revised this gist
May 1, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ include "utils.ul" loop: rand r1 mulf r1, 255, r1 f2i r1, r1 push r1 call _gfx_clear -
badlogic revised this gist
May 1, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@ include "utils.ul" loop: rand r1 mul r1, 255, r1 f2i r1, r1 push r1 call _gfx_clear call _gfx_show -
badlogic revised this gist
May 1, 2022 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,10 @@ include "utils.ul" loop: rand r1 mul r1, 255, r1 f2i push r1 call _gfx_clear call _gfx_show jmp loop -
badlogic revised this gist
May 1, 2022 . 1 changed file with 5 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,7 @@ include "utils.ul" loop: push 0xff00ff00 call _gfx_clear call _gfx_show jmp loop -
badlogic revised this gist
May 1, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ include "utils.ul" push 0xff00ff00 call _gfx_clear call _gfx_show -
badlogic revised this gist
May 1, 2022 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -29,6 +29,7 @@ _gfx_clear: _gfx_show: push _gfx_buffer syscall 0x1 ret _utils_ul_end: nop -
badlogic revised this gist
May 1, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ include "utils.ul" push 0xffff0000 call _gfx_clear call _gfx_show -
badlogic revised this gist
May 1, 2022 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,4 +3,6 @@ include "utils.ul" push 0xffffffff call _gfx_clear call _gfx_show halt -
badlogic revised this gist
May 1, 2022 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,6 @@ include "utils.ul" push 0xffffffff call _gfx_clear halt -
badlogic revised this gist
May 1, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ jmp _utils_ul_end _gfx_clear: pusha ld sp, 16 * 4, r1 mov _gfx_buffer, r2 _gfx_clear_loop: -
badlogic revised this gist
May 1, 2022 . 1 changed file with 6 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,8 @@ # The frame buffer, 320x240 pixels, RGBA _gfx_buffer: reserve int x 320 * 240 jmp _utils_ul_end #-------------------------------------------------- # Clears the frame buffer with the given color # @@ -26,4 +28,7 @@ _gfx_clear: #-------------------------------------------------- _gfx_show: push _gfx_buffer syscall 0x1 _utils_ul_end: nop -
badlogic revised this gist
May 1, 2022 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,2 +1,4 @@ include "utils.ul" push 0xffffffff call _gfx_clear -
badlogic revised this gist
May 1, 2022 . 1 changed file with 9 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,11 @@ # The frame buffer, 320x240 pixels, RGBA _gfx_buffer: reserve int x 320 * 240 #-------------------------------------------------- # Clears the frame buffer with the given color # # [SP + 0]: color #-------------------------------------------------- _gfx_clear: pusha @@ -15,6 +21,9 @@ _gfx_clear: popa retn 1 #-------------------------------------------------- # Blits the frame buffer to the screen #-------------------------------------------------- _gfx_show: push _gfx_buffer syscall 0x1 -
badlogic revised this gist
May 1, 2022 . 2 changed files with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,2 @@ include "utils.ul" This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,4 +13,8 @@ _gfx_clear: jl r4, _gfx_clear_loop popa retn 1 _gfx_show: push _gfx_buffer syscall 0x1 -
badlogic revised this gist
May 1, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ _gfx_clear: mov _gfx_buffer, r2 _gfx_clear_loop: sto r1, r2, 0 add r2, 4, r2 cmp r2, _gfx_buffer + 320 * 240 * 4, r4 jl r4, _gfx_clear_loop -
badlogic revised this gist
May 1, 2022 . 1 changed file with 6 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,11 +5,12 @@ _gfx_clear: ld sp, 15 * 4, r1 mov _gfx_buffer, r2 _gfx_clear_loop: sto r3, r1, r2 add r2, 4, r2 cmp r2, _gfx_buffer + 320 * 240 * 4, r4 jl r4, _gfx_clear_loop popa retn 1 -
badlogic revised this gist
May 1, 2022 . No changes.There are no files selected for viewing
-
badlogic created this gist
May 1, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ include "utils.ul" halt This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,15 @@ _gfx_buffer: reserve int x 320 * 240 _gfx_clear: pusha ld sp, 15 * 4, r1 mov _gfx_buffer, r2 clear_buffer_loop: sto r3, r1, r2 add r2, 4, r2 cmp r2, 320 * 240 * 4, r4 jl r4, clear_buffer_loop popa retn 1