回覆列表
  • 1 # 滴逃逃

    .MODEL SMALL

    .DATA

    INFOR DB 13, 10, "INPUT X: $"

    CC DB 13, 10, "INPUT Y: $"

    ZZ DB 13, 10, "Z = (X + 20) / 6 - 4Y = $"

    .STACK 100H

    .CODE

    START:

    MOV AX, @DATA

    MOV DS, AX

    MOV DX, OFFSET INFOR

    MOV AH, 9

    INT 21H

    MOV AH, 1

    INT 21H

    SUB AL, 30H

    ADD AL, 20

    MOV AH, 0

    MOV BL, 6

    DIV BL

    MOV AH, 0

    MOV BX, AX

    ;

    MOV DX, OFFSET CC

    MOV AH, 9

    INT 21H

    MOV AH, 1

    INT 21H

    SUB AL, 30H

    MOV AH, 0

    MOV DL, 4

    MUL DL

    SUB BX, AX

    MOV DX, OFFSET ZZ

    MOV AH, 9

    INT 21H

    ;

    MOV AX, BX

    CMP AX, 32768

    JB NEXT

    NEG AX ;(AX)

    MOV BX, AX

    MOV AH, 2

    MOV DL, "-"

    INT 21H

    MOV AX, BX

    NEXT:

    AAM

    ADD AX, 3030H

    MOV DX, AX

    MOV AH, 2

    XCHG DL, DH

    INT 21H

    MOV DL, DH

    INT 21H

    MOV AH, 4CH

    INT 21H

    END START

  • 中秋節和大豐收的關聯?
  • 為什麼保羅叫蜂王?