Fixed memory lea issue in stage 4
Added Stage 5 polygon and array functions
This commit is contained in:
@ -275,14 +275,14 @@ cons_filled_rect_check_x_dir:
|
||||
cmpw $0, %ax
|
||||
jge cons_filled_rect_check_y_dir
|
||||
add %ax, rectx(%bp)
|
||||
neg rectwidth(%bp)
|
||||
negw rectwidth(%bp)
|
||||
|
||||
cons_filled_rect_check_y_dir:
|
||||
movw rectheight(%bp), %ax # Check if the user has entered a negative height value and swap the direction to a pos
|
||||
cmpw $0, %ax
|
||||
jge cons_filled_rect_check_x_zero
|
||||
add %ax, recty(%bp)
|
||||
neg rectheight(%bp)
|
||||
negw rectheight(%bp)
|
||||
|
||||
cons_filled_rect_check_x_zero:
|
||||
movw rectx(%bp), %ax # Check if the x value is a negative value, set it to 0 and figure out the offset so we
|
||||
@ -344,8 +344,7 @@ cons_filled_rect_setup:
|
||||
movw (screen_width), %ax # Set ax to 320 so that we can multiply this by y
|
||||
mul %dx # does the (y * 320) part of our math
|
||||
add rectx(%bp), %ax # Add the value of x to register ax
|
||||
movw %ax, %si
|
||||
lea %es:(%si), %bx # Load the memory address into the bx register
|
||||
movw %ax, %bx # Load the memory offset address into the bx register
|
||||
|
||||
movw rectheight(%bp), %si # Set the counter to our height which should be the number of lines to draw to
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
stage4/xv6.img
(Stored with Git LFS)
BIN
stage4/xv6.img
(Stored with Git LFS)
Binary file not shown.
Reference in New Issue
Block a user