SI Macro

 

获取 buf 里的 symbol 

cbuf = BufListCount()
msg(cbuf)
ibuf = 0
while (ibuf < cbuf)
{
    hbuf = BufListItem(ibuf)
    isymMax = GetBufSymCount(hbuf)
    msg(isymMax)
    isym = 0
    while (isym < isymMax)
    {
        symname = GetBufSymLocation(hbuf, isym)
        msg(symname)
        isym = isym + 1
    }
    ibuf = ibuf + 1
}

  

转载于:https://www.cnblogs.com/fish7/p/6672157.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
exit MACRO mov ah,4ch int 21h ENDM print MACRO addr lea dx,addr mov ah,9 int 21h ENDM read MACRO addr lea dx,addr mov ah,10 int 21h mov bl,[addr+1] xor bh,bh mov [addr+bx+2],"$" ENDM getchar MACRO mov ah,1 int 21h ENDM putchar MACRO ascii mov dl,ascii mov ah,2 int 21h ENDM data segment msg1 db "Enter message:",0ah,'$' msg2 db "Enter an integer:",0ah,'$' errormsg db "Error:input length error.$" buffer1 db 41,?,41 dup(?) buffer2 db 3,?,3 dup(?) data ends code segment start: assume cs:code,ds:data mov ax,data mov ds,ax mov es,ax call func1 call func2 call func3 call func4 call func5 exit func1 PROC print msg1 read buffer1 cmp [buffer1+1],15 jb invalid_input cmp [buffer1+1],40 ja invalid_input putchar 0ah ret invalid_input: print errormsg exit func1 ENDP func2 PROC xor ax,ax mov al,[buffer1+1] mov dl,10 div dl or ax,3030h mov dx,ax putchar dl putchar dh putchar 0ah ret func2 ENDP func3 PROC xor cx,cx mov cl,[buffer1+1] lea bx,buffer1+2 xor si,si mov dx,cx startloop: cmp byte ptr [bx+si],'A' jb notascii cmp byte ptr[bx+si],'Z' jbe isascii cmp byte ptr[bx+si],'z' ja notascii cmp byte ptr[bx+si],'a' jae isascii jmp notascii isascii:dec dx notascii:inc si loop startloop mov ax,dx mov dl,10 div dl or ax,3030h mov dx,ax putchar dl putchar dh putchar 0ah ret func3 ENDP func4 PROC xor cx,cx mov cl,[buffer1+1] mov si,cx dec si lea bx,buffer1+2 startloop2: mov dl,[bx+si] mov ah,2 int 21h dec si loop startloop2 putchar 0ah ret func4 ENDP func5 PROC print msg2 read buffer2 xor cx,cx mov cl,[buffer2+1] xor dx,dx xor si,si startloop3: add dl,[buffer2+2+si] xor dl,30h inc si loop startloop3 mov cx,dx xor dx,dx mov dl,[buffer1+1] mov si,dx dec si lea bx,buffer1+2 jmp startloop2 func5 ENDP code ends end start请为这篇8086汇编语言代码逐句写出详细注释
05-26

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值