📄 vaxemulat.s
字号:
#+ # input parameters: # # opcode(sp) # old_pc(sp) # operand_1(sp) - char.rb # operand_2(sp) - len.rw # operand_3(sp) - addr.ab # operand_4(sp) # operand_5(sp) # operand_6(sp) # operand_7(sp) # operand_8(sp) # new_pc(sp) # exception_psl(sp) # # output parameters: # # r0<15:0> - len.rw # r0<23:16> - char.rb # r1 - addr.ab # # implicit output: # # r0<31:24> - unpredictable #-Llocc: rotl $16,operand_1(sp),r0 # r0<23:16> <- char.ab movw operand_2(sp),r0 # r0<15:0> <- len.rw movl operand_3(sp),r1 # r1 <- addr.ab # now that the operands have been loaded, the only exception parameter # other than the pc/psl pair that needs to be saved is the old pc. however, # there is no reason why the state of the stack needs to be altered and we # save two instructions if we leave the stack alone. pushab vax$exit_emulator # store the return pc jmp vax$locc # do the actual work #+ # input parameters: # # opcode(sp) # old_pc(sp) # operand_1(sp) - char.rb # operand_2(sp) - len.rw # operand_3(sp) - addr.ab # operand_4(sp) # operand_5(sp) # operand_6(sp) # operand_7(sp) # operand_8(sp) # new_pc(sp) # exception_psl(sp) # # output parameters: # # r0<15:0> - len.rw # r0<23:16> - char.rb # r1 - addr.ab # # implicit output: # # r0<31:24> - unpredictable #-Lskpc: rotl $16,operand_1(sp),r0 # r0<23:16> <- char.ab movw operand_2(sp),r0 # r0<15:0> <- len.rw movl operand_3(sp),r1 # r1 <- addr.ab # now that the operands have been loaded, the only exception parameter # other than the pc/psl pair that needs to be saved is the old pc. however, # there is no reason why the state of the stack needs to be altered and we # save two instructions if we leave the stack alone. pushab vax$exit_emulator # store the return pc jmp vax$skpc # do the actual work #+ # input parameters: # # opcode(sp) # old_pc(sp) # operand_1(sp) - objlen.rw # operand_2(sp) - objaddr.ab # operand_3(sp) - srclen.rw # operand_4(sp) - srcaddr.ab # operand_5(sp) # operand_6(sp) # operand_7(sp) # operand_8(sp) # new_pc(sp) # exception_psl(sp) # # output parameters: # # r0<15:0> - objlen.rw # r1 - objaddr.ab # r2<15:0> - srclen.rw # r3 - srcaddr.ab # # implicit output: # # r0<31:16> - 0 # r2<31:16> - 0 #-Lmatchc: movzwl operand_1(sp),r0 # r0<15:0> <- objlen.rw movl operand_2(sp),r1 # r1 <- objaddr.ab movzwl operand_3(sp),r2 # r2<15:0> <- srclen.rw movl operand_4(sp),r3 # r3 <- srcaddr.ab # now that the operands have been loaded, the only exception parameter # other than the pc/psl pair that needs to be saved is the old pc. however, # there is no reason why the state of the stack needs to be altered and we # save two instructions if we leave the stack alone. pushab vax$exit_emulator # store the return pc jmp vax$matchc # do the actual work #+ # input parameters: # # opcode(sp) # old_pc(sp) # operand_1(sp) - tbl.ab # operand_2(sp) - inicrc.rl # operand_3(sp) - strlen.rw # operand_4(sp) - stream.ab # operand_5(sp) # operand_6(sp) # operand_7(sp) # operand_8(sp) # new_pc(sp) # exception_psl(sp) # # output parameters: # # r0 - inicrc.rl # r1 - tbl.ab # r2<15:0> - strlen.rw # r3 - stream.ab # # implicit output: # # r2<31:16> - 0 #-Lcrc: movl operand_1(sp),r1 # r1 <- tbl.ab movl operand_2(sp),r0 # r0 <- inicrc.rl movzwl operand_3(sp),r2 # r2<15:0> <- strlen.rw movl operand_4(sp),r3 # r3 <- stream.ab # now that the operands have been loaded, the only exception parameter # other than the pc/psl pair that needs to be saved is the old pc. however, # there is no reason why the state of the stack needs to be altered and we # save two instructions if we leave the stack alone. pushab vax$exit_emulator # store the return pc jmp vax$crc # do the actual work #+ # input parameters: # # opcode(sp) # old_pc(sp) # operand_1(sp) - addlen.rw # operand_2(sp) - addaddr.ab # operand_3(sp) - sumlen.rw # operand_4(sp) - sumaddr.ab # operand_5(sp) # operand_6(sp) # operand_7(sp) # operand_8(sp) # new_pc(sp) # exception_psl(sp) # # output parameters: # # r0<15:0> - addlen.rw # r1 - addaddr.ab # r2<15:0> - sumlen.rw # r3 - sumaddr.ab # # implicit output: # # r0<31:16> - 0 # r2<31:16> - 0 #-Laddp4: movzwl operand_1(sp),r0 # r0<15:0> <- addlen.rw movl operand_2(sp),r1 # r1 <- addaddr.ab movzwl operand_3(sp),r2 # r2<15:0> <- sumlen.rw movl operand_4(sp),r3 # r3 <- sumaddr.ab # now that the operands have been loaded, the only exception parameter # other than the pc/psl pair that needs to be saved is the old pc. however, # there is no reason why the state of the stack needs to be altered and we # save two instructions if we leave the stack alone. pushab vax$exit_emulator # store the return pc jmp vax$addp4 # do the actual work #+ # input parameters: # # opcode(sp) # old_pc(sp) # operand_1(sp) - add1len.rw # operand_2(sp) - add1addr.ab # operand_3(sp) - add2len.rw # operand_4(sp) - add2addr.ab # operand_5(sp) - sumlen.rw # operand_6(sp) - sumaddr.ab # operand_7(sp) # operand_8(sp) # new_pc(sp) # exception_psl(sp) # # output parameters: # # r0<15:0> - add1len.rw # r1 - add1addr.ab # r2<15:0> - add2len.rw # r3 - add2addr.ab # r4<15:0> - sumlen.rw # r5 - sumaddr.ab # # implicit output: # # r0<31:16> - 0 # r2<31:16> - 0 # r4<31:16> - 0 #-Laddp6: movzwl operand_1(sp),r0 # r0<15:0> <- add1len.rw movl operand_2(sp),r1 # r1 <- add1addr.ab movzwl operand_3(sp),r2 # r2<15:0> <- add2len.rw movl operand_4(sp),r3 # r3 <- add2addr.ab movzwl operand_5(sp),r4 # r4<15:0> <- sumlen.rw movl operand_6(sp),r5 # r5 <- sumaddr.ab # now that the operands have been loaded, the only exception parameter # other than the pc/psl pair that needs to be saved is the old pc. however, # there is no reason why the state of the stack needs to be altered and we # save two instructions if we leave the stack alone. pushab vax$exit_emulator # store the return pc jmp vax$addp6 # do the actual work #+ # input parameters: # # opcode(sp) # old_pc(sp) # operand_1(sp) - cnt.rb # operand_2(sp) - srclen.rw # operand_3(sp) - srcaddr.ab # operand_4(sp) - round.rb # operand_5(sp) - dstlen.rw # operand_6(sp) - dstaddr.ab # operand_7(sp) # operand_8(sp) # new_pc(sp) # exception_psl(sp) # # output parameters: # # r0<15:0> - srclen.rw # r0<31:16> - count.rb # r1 - srcaddr.ab # r2<15:0> - dstlen.rw # r2<31:16> - round.rb # r3 - dstaddr.ab # # implicit output: # # r0<31:24> - unpredictable # r2<31:24> - unpredictable #-Lashp: rotl $16,operand_1(sp),r0 # r0<31:16> <- count.rb movw operand_2(sp),r0 # r0<15:0> <- srclen.rw movl operand_3(sp),r1 # r1 <- srcaddr.ab rotl $16,operand_4(sp),r2 # r2<31:16> <- round.rb movw operand_5(sp),r2 # r2<15:0> <- dstlen.rw movl operand_6(sp),r3 # r3 <- dstaddr.ab # now that the operands have been loaded, the only exception parameter # other than the pc/psl pair that needs to be saved is the old pc. however, # there is no reason why the state of the stack needs to be altered and we # save two instructions if we leave the stack alone. pushab vax$exit_emulator # store the return pc jmp vax$ashp # do the actual work #+ # input parameters: # # opcode(sp) # old_pc(sp) # operand_1(sp) - len.rw # operand_2(sp) - src1addr.ab # operand_3(sp) - src2addr.ab # operand_4(sp) # operand_5(sp) # operand_6(sp) # operand_7(sp) # operand_8(sp) # new_pc(sp) # exception_psl(sp) # # output parameters: # # r0<15:0> - len.rw # r1 - src1addr.ab # r3 - src2addr.ab # # implicit output: # # r0<31:16> - 0 # r2 - unpredictable #-Lcmpp3: movzwl operand_1(sp),r0 # r0<15:0> <- len.rw movl operand_2(sp),r1 # r1 <- src1addr.ab movl operand_3(sp),r3 # r3 <- src2addr.ab # now that the operands have been loaded, the only exception parameter # other than the pc/psl pair that needs to be saved is the old pc. however, # there is no reason why the state of the stack needs to be altered and we # save two instructions if we leave the stack alone. pushab vax$exit_emulator # store the return pc jmp vax$cmpp3 # do the actual work #+ # input parameters: # # opcode(sp) # old_pc(sp) # operand_1(sp) - src1len.rw # operand_2(sp) - src1addr.ab # operand_3(sp) - src2len.rw # operand_4(sp) - src2addr.ab # operand_5(sp) # operand_6(sp) # operand_7(sp) # operand_8(sp) # new_pc(sp) # exception_psl(sp) # # output parameters: # # r0<15:0> - src1len.rw # r1 - src1addr.ab # r2<15:0> - src2len.rw # r3 - src2addr.ab # # implicit output: # # r0<31:16> - 0 # r2<31:16> - 0 #-Lcmpp4: movzwl operand_1(sp),r0 # r0<15:0> <- src1len.rw movl operand_2(sp),r1 # r1 <- src1addr.ab movzwl operand_3(sp),r2 # r2<15:0> <- src2len.rw movl operand_4(sp),r3 # r3 <- src2addr.ab # now that the operands have been loaded, the only exception parameter # other than the pc/psl pair that needs to be saved is the old pc. however, # there is no reason why the state of the stack needs to be altered and we # save two instructions if we leave the stack alone. pushab vax$exit_emulator # store the return pc jmp vax$cmpp4 # do the actual work #+ # input parameters: # # opcode(sp) # old_pc(sp) # operand_1(sp) - src.rl # operand_2(sp) - dstlen.rw # operand_3(sp) - dstaddr.ab # operand_4(sp) # operand_5(sp) # operand_6(sp) # operand_7(sp) # operand_8(sp) # new_pc(sp) # exception_psl(sp) # # output parameters: # # r0 - src.rl # r2<15:0> - dstlen.rw # r3 - dstaddr.ab # # implicit output: # # r1 - explicity set to zero # r2<31:16> - 0 #-Lcvtlp: movl operand_1(sp),r0 # r0 <- src.rl clrl r1 # r1 <- 0 movzwl operand_2(sp),r2 # r2<15:0> <- dstlen.rw movl operand_3(sp),r3 # r3 <- dstaddr.ab # now that the operands have been loaded, the only exception parameter # other than the pc/psl pair that needs to be saved is the old pc. however, # there is no reason why the state of the stack needs to be altered and we # save two instructions if we leave the stack alone. pushab vax$exit_emulator # store the return pc jmp vax$cvtlp # do the actual work #+ # input parameters: # # opcode(sp) # old_pc(sp) # operand_1(sp) - srclen.rw # operand_2(sp) - srcaddr.ab # operand_3(sp) - dst.wl # operand_4(sp) # operand_5(sp) # operand_6(sp) # operand_7(sp) # operand_8(sp) # new_pc(sp) # exception_psl(sp) # # output parameters: # # r0<15:0> - srclen.rw # r1 - srcaddr.ab # r3 - dst.wl # # notes: # # the routine header for vax$cvtpl describes how the destination is # encoded in a register. basically, operand_3 contains the effective # address of the operand. if the destination is a general register, then # operand_3 contains the ones complement of the register number. # # implicit output: # # r0<31:16> - 0 # r2 - explicitly set to zero #-Lcvtpl: movzwl operand_1(sp),r0 # r0<15:0> <- srclen.rw movl operand_2(sp),r1 # r1 <- srcaddr.ab clrl r2 # r2 <- 0 movl operand_3(sp),r3 # r3 <- dst.wl # now that the operands have been loaded, the only exception parameter # other than the pc/psl pair that needs to be saved is the old pc. however, # there is no reason why the state of the stack needs to be altered and we # save two instructions if we leave the stack alone. pushab vax$exit_emulator # store the return pc jmp vax$cvtpl # do the actual work #+ # input parameters: # # opcode(sp) # old_pc(sp) # operand_1(sp) - srclen.rw # operand_2(sp) - srcaddr.ab # operand_3(sp) - dstlen.rw # operand_4(sp) - dstaddr.ab # operand_5(sp) # operand_6(sp) # operand_7(sp) # operand_8(sp) # new_pc(sp) # exception_psl(sp) # # output parameters: # # r0<15:0> - srclen.rw # r1 - srcaddr.ab # r2<15:0> - dstlen.rw # r3 - dstaddr.ab # # implicit output: #
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -