windows cmd

This commit is contained in:
Sarah Jamie Lewis 2021-11-14 22:06:37 -08:00
parent 85c4715a52
commit 45ca864b66
2 changed files with 42 additions and 13 deletions

View File

@ -58,6 +58,7 @@ data ascii quit_label QUIT
data ascii jump_label JUMP
data ascii diss_label DISS
data ascii alloc_label ALLOC
data ascii window_lol_label WINDOWS
data buffer command_line_input 64
@ -145,7 +146,8 @@ data ascii diss_unknown unknown opcode
; start length
; n ptr yo bu
label window_lol
$00
label append_num_to_string:
tx $8 $4
@ -326,6 +328,15 @@ label do_shell:
add $4 $5 $4
call jump
loadi $4 @command_line_input
loadi $5 window_lol_label
loadi $6 ff
call strcmp
loadi $2 1
jneq +4 ; if the command is QUIT, then hlt the machine!! A shell is born
loadi $1 1
store $1 window_lol
ret
loadi $4 @command_line_input
loadi $5 alloc_label
@ -388,6 +399,8 @@ label append_node:
label _temp_window_list_ptr
nop
; Kernel Begins
@ $CB000:
@ -413,16 +426,6 @@ label _temp_window_list_ptr
rload $5 $5
call append_node
loadi $4 $140
loadi $5 $140
loadi $6 $F0
loadi $7 $50
loadi $8 TestWindow2
call make_window
call make_node ; with the data in 4
loadi $5 kernel_windows_end
rload $5 $5
call append_node
;tore $4 kernel_windows_end ; bump the end pointer
@ -441,6 +444,30 @@ label _temp_window_list_ptr
call draw_filled_rect
load $1 window_lol
loadi $2 1
jneq +19
load $1 CycleCount
loadi $2 $1FF
and $1 $2 $4
load $1 CycleCount
loadi $2 F
shift $1 $2 $1
loadi $2 $F0
and $1 $2 $5
loadi $1 1F
add $1 $5 $5
loadi $6 64
loadi $7 64
loadi $8 TestWindow
call make_window
call make_node ; with the data in 4
loadi $5 kernel_windows_end
rload $5 $5
call append_node
; Render All The Windows...
load $4 kernel_windows_start
label draw_next_window:

View File

@ -1,13 +1,15 @@
; x,y, width, height; title
; returns the address of the window on the heap in $4
label make_window
tx $C $4
tx $D $5
loadi $4 6
call $FFFFF0 ; allocate 6 bytes on the heap
tx $E $4
rstore $D $4
rstore $C $4
inc $4
rstore $5 $4
rstore $D $4
inc $4
rstore $6 $4
inc $4