本文介绍了模拟与JMP的调用最好的办法(DOS组装)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Windows上使用平板汇编器和已经模拟了JMP CALL指令,但不知道是否有更好的方法以更少code办呢?(不使用电话)
I'm using a flat assembler on windows and have already simulated a call instruction with jmp but was wondering if there's a better way to do it with less code?(not using a call)
这里的code。
org 100h
mov al, 'x'
push come_back ; - simulated "call" -
jmp test_label ; - continued -
come_back: ; - end of simulated "call" -
mov al, 'y'
push come_back2 ; - simulated "call" -
jmp test_label ; - continued -
come_back2: ; - end of simulated "call" -
Looop:
jmp Looop
test_label:
mov ah, 0x0e
int 0x10
pop cx ; - simulated "ret" -
jmp cx ; - end of simulated "ret"
这code只是显示屏上的XY,两个char的控制台。
This code just display's "xy", two char's to the console.
我不希望因为我wan't更好的理解,有时候,涉及处事错误的方式使用电话。
我是新来装配,不知道会是什么,去对此的最好方式。
I don't want to use a call because i wan't a better understanding, and sometimes that involves doing things the wrong way.I'm new to assembly and didn't know what would be the best way to go about this.
推荐答案
这可能工作:
push $+5
jmp fn
; no label needed here
一些组装机将跨preT $
作为指令地址。
这是一个无限循环:
jmp $
这篇关于模拟与JMP的调用最好的办法(DOS组装)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!