Assembly 火星上的光标定位
请注意,我正在尝试创建一个MIPS程序,该程序可以监视光标的度数/位置。这是我的代码。它运行成功,但我什么也没看到Assembly 火星上的光标定位,assembly,mips,cursor-position,mars-simulator,Assembly,Mips,Cursor Position,Mars Simulator,请注意,我正在尝试创建一个MIPS程序,该程序可以监视光标的度数/位置。这是我的代码。它运行成功,但我什么也没看到 .text li $s7,100 #load a = 100 main: for: move $a0,$v0 move $a1,$v1 j for2 for2: move $a2,$t6 move $a3,$a0 move $t2,$a1 li $s5,10 move $a2,$s6
.text
li $s7,100 #load a = 100
main:
for:
move $a0,$v0
move $a1,$v1
j for2
for2:
move $a2,$t6
move $a3,$a0
move $t2,$a1
li $s5,10
move $a2,$s6
li $k1, 21
beq $s1,$s2, foo3
jal foo3
beq $s3,$t5, foo1
jal foo1
j for2
foo1:
addi $sp,$sp,1
j for
foo3:
li $s4, 20
首先,我假设:
andi $a6, $a7, 00000010
beq $a6, ZERO, SKM #GOES to check for middle if it is zero
addi $a1, ZERO, 1 #Else it is in the middle
SKM:
安迪:a6美元,a7美元,100000美元
beq $a6, ZERO, SKR #Skips the next line to check for right click
addi $a1, ZERO, 1 #Else it is in the Middle
SKR:andi$a6,$a7,10000000
beq $a6, ZERO, SKXY #Skips the next line to X&Y co-ordinate
addi $a1, ZERO, 1 #Else it is in RightClick
SKXY:jr rs首先,我假设:
andi $a6, $a7, 00000010
beq $a6, ZERO, SKM #GOES to check for middle if it is zero
addi $a1, ZERO, 1 #Else it is in the middle
SKM:
安迪:a6美元,a7美元,100000美元
beq $a6, ZERO, SKR #Skips the next line to check for right click
addi $a1, ZERO, 1 #Else it is in the Middle
SKR:andi$a6,$a7,10000000
beq $a6, ZERO, SKXY #Skips the next line to X&Y co-ordinate
addi $a1, ZERO, 1 #Else it is in RightClick
SKXY:jr-rs我很确定MARS没有任何光标位置系统调用来在输出窗口中移动文本光标。它的玩具系统调用API太原始了。另外,也没有内存映射IO方法来操作光标。我不知道位图图形输出模式,它是否支持任何鼠标光标的东西。如果我们不使用syscall而使用bits呢。位0=左,位1=右等等?我很确定MARS没有任何光标位置系统调用来在输出窗口中移动文本光标。它的玩具系统调用API太原始了。另外,也没有内存映射IO方法来操作光标。我不知道位图图形输出模式,它是否支持任何鼠标光标的东西。如果我们不使用syscall而使用bits呢。位0=左,位1=右等?