gpt4 book ai didi

assembly - Tasm 宏默认值

转载 作者:行者123 更新时间:2023-12-04 17:38:40 24 4
gpt4 key购买 nike

在 turbo 汇编器中我有一个宏

subs macro x,y 
mov ax,x
sub ax,y
endm

我怎样才能给 y 一个默认值,等于 1,这样我就可以写

subs bx

ax 等于 bx - 1?

最佳答案

subs MACRO x,y
IFB <y>
mov ax,x
sub ax,1
ELSE
mov ax,x
sub ax,y
ENDIF
ENDM

您需要引用:http://www.bitsavers.org/pdf/borland/turbo_assembler/

关于assembly - Tasm 宏默认值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55557344/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com