⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 1.asm

📁 微机原理与接口技术的部分课后题(十几题经典的)程序
💻 ASM
字号:
data segment
tabl dw 10h 1h,-1h,1h,-1h,1h,-1h,1h,-1h,1h,-1h
zheng dw 10h dup(?)
fu dw 10h dup(?)
char1 db '正数个数:','$'
char2 db '负数个数:','$'
data ends
code segment
    assume cs:code, ds:data
start: mov ax,data
       mov ds,ax
       mov dx=0
       mov cx,10h
       mov bx,offset tabl
       mov di,offset zheng
       mov si,offset fu
  lop:mov ax,[bx]
      inc bx
      inc bx
      cmp ax,0
      jg zsu
      jl fsu
      loop lop
      jmp sc
      
  zsu:mov [di],ax
      inc di
      inc di
      inc dl
      loop lop
      jmp sc
  fsu:mov [si],ax
      inc si
      inc si
      inc dh
      loop lop
   sc:mov bx,dx
      mov dx,offset char1
      mov ax,09h
      int 21h
      mov dx,offset char1
      mov ax,09h
      int 21h
      mov dl,bh
      mov ah,02h
      int 21h
      mov ah,4ch
      int 21h
  code ends
       end start
 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -