实验二 机器码编程实验源代码LC3汇编 12345678910111213141516.ORIG x3000 ;将x3000作为程序起始位置LD R2 xFF ;读取x3100处的值存入R2AND R1 R1 #0 ;R1初始化为0AND R0 R0 #0 ;R0初始化为0,'1'计数器ADD R1 R1 15 ;循环计数器LOOP AND R2 R2 R2 ;读取R2符号位BRZP x1ADD R0 R0 #1 ;若符号位为1计数器加1ADD R2 R2 R2 ;R2左移一位ADD R1 R1 #-1 ;循环计数器-1BRZP LOOPST R0 xF6HALT.END LC3机器码 123456789101112130011000000000000001001001111111101010010011000000101000000100000000100100110111101010100100000100000011000000001000100000010000100010100100000100001001001111111000001111111101000110000111101101111000000100101