注册 登录
编程论坛 汇编论坛

大虾们进来帮帮,小弟在些先谢过了

楚天 发布于 2008-07-29 09:55, 911 次点击
我是学C++,VC的不过现在要考试
学校让我们在三天之内学汇编
太难了
?能帮我看看一个非常简单的小程序
帮我解释一下每行都是什么意思
我什么也不知道
我想了解一下过程
万分感谢

[[it] 本帖最后由 楚天 于 2008-7-29 10:02 编辑 [/it]]
2 回复
#2
楚天2008-07-29 09:56
就这个
‘A’。要求:将程序补充完整,code1 segment
      assume cs:code1
start: call far ptr disp
       mov   ah,4ch
       int   ( 21h )
code2 segment
      assume cs:code2
disp  proc   far
      ( mov  )  dl,( a )
      mov    ah,( z )
      int    21h
      ret
 disp  endp
 code2 ends
        end start

data segment
    buf  db  -32,25,36,-18,-64,10,-3
    count  equ  $-buf
    plus   db  ?
    minus  db  ?
data ends

code segment
     assume cs:code, ds:data
 start:
     mov  ax,data
     mov  ds,ax
     mov  bl,0
     mov  dl,0

     ---------------
     mov  cx,0
lop1:mov  al,[si]
     cmp  al,0
     jge  next0
     inc  bl
     jmp  next1
next0:inc dl
next1:inc si
      inc cx
      cmp cx,count

      -------------
      mov minus,bl
      mov plus,dl

      -------------
      mov ah,2
      int 21h
      mov ah,4ch
      int 21h

code ends
      end start

[[it] 本帖最后由 楚天 于 2008-7-29 10:18 编辑 [/it]]
#3
楚天2008-07-29 09:57
在z线等啊
明天就要开考了
1