汇编语言编程问题?会的来。
- 提问者网友:龅牙恐龙妹
- 2021-04-22 15:59
- 五星知识达人网友:一袍清酒付
- 2021-04-22 17:03
data segment
NUM DW 50 DUP(?)
C1 DW 0
C2 DW 0
C3 DW 0
data ends
code segment
assume cs:code, ds:data
start:
mov ax,data
mov ds,ax
mov es,ax
mov si, offset NUM
mov cx, 50h
cld
Loop_Start:
lodsw
or ax,ax
jz L_0
jg L_G
inc C1
jmp Loop_Next
L_0:
inc C2
jmp Loop_Next
L_G:
inc C3
Loop_Next:
Loop Loop_Start
code ends
end start
- 1楼网友:玩家
- 2021-04-22 18:39
- 2楼网友:酒安江南
- 2021-04-22 18:19
data segment ORG 3000H array db 0FFH,035H,0C8H,33H,1H,0H,0EAH Z db 0 F db 0 L db 0 data ends
stack segment db 64 dup(0) stack ends
code segment assume cs:code,ds:data,SS:stack start: mov ax,data mov ds,ax mov si,offset array mov cx,offset Z sub cx,si lop:mov al,[si] cmp al,0 jnz non inc [L] jmp ag non:test al,80H jnz isf inc [Z] jmp ag isf:inc [F] ag: inc si loop lop int 3 mov ah,4CH int 21H code ends end start
以前我做的~~
变量自己改下OK