广工自动化微机实验(胶印)

合集下载
相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

(大神出品,不保证没错误)

实验一:

1.1:

STACK SEGMENT STACK

DW 64 DUP(?)

STACK ENDS

DATA SEGMENT

ORG 0500H

DATA1 DB 5 DUP(?)

ORG 050AH

DATA2 DB 5 DUP(?)

DATA ENDS

CODE SEGMENT

ASSUME CS:CODE,DS:DATA,SS:STACK START: MOV AX,DATA

MOV DS,AX

MOV CX,5

MOV DI,OFFSET DATA1

MOV SI,OFFSET DATA2

LAB1: MOV BL,0FFH

MOV AL, [DI]

CMP AL,3AH

JNB OK

SUB AL,30H

JC OK

MOV BL,AL

OK: MOV AL,BL

MOV [SI],AL

INC DI

INC SI

LOOP LAB1

MOV AH,4CH

INT 21H

CODE ENDS

END START

1.2:

STACK SEGMENT STACK

DW 64 DUP(?)

STACK ENDS

DATA SEGMENT

ORG 0500H

DATA1 DW 78EDH

ORG 0510H

DATA2 DB 5 DUP(?)

DATA ENDS

CODE SEGMENT

ASSUME CS:CODE,DS:DATA,SS:STACK START: MOV AX,DATA

MOV DS,AX

LEA SI,DATA1

LEA DI,DATA2+4

MOV BX,000AH

MOV CX,0005H

MOV AX,[SI]

AA0: MOV DX,0000H

DIV BX

MOV [DI],DL

DEC DI

LOOP AA0

MOV AH,4CH

INT 21H

CODE ENDS

END START

1.3:

STACK SEGMENT STACK

DW 64 DUP(?)

STACK ENDS

DATA SEGMENT

ORG 0500H

DATA1 DB 2 DUP(?)

ORG 050AH

DATA2 DB 4 DUP(?)

DATA ENDS

CODE SEGMENT

ASSUME CS:CODE,DS:DATA START: MOV AX,DATA

MOV DS,AX

MOV DI,OFFSET DATA1

MOV SI,OFFSET DATA2

MOV AX,[DI]

MOV CX,0004H

MOV BX,1000H

A1: MOV DX,0000H

DIV BX

JAE A3

ADD AL,30H

A2: MOV [SI],AL

INC SI

PUSH DX

MOV AX,BX

MOV BX,0010H

MOV DX,0000H

DIV BX

MOV BX,AX

POP DX

MOV AX,DX

LOOP A1

INT 03H

A3: SUB AL,0AH

ADD AL,41H

JMP A2

CODE ENDS

END START

1.4

STACK SEGMENT STACK

DW 64 DUP(?)

STACK ENDS

DATA SEGMENT

ORG 0500H

DATA1 DB 8 DUP(?)

ORG 0510H

DATA2 DB 8 DUP(?)

DATA ENDS

CODE SEGMENT

ASSUME CS:CODE,DS:DATA START: MOV AX,DATA

MOV DS,AX

MOV DI,OFFSET DATA1 MOV SI,OFFSET DATA2 MOV CX,0004H

MOV BL,0AH

MOV AH,00H

A1: MOV AL,[DI]

MUL BL

INC DI

MOV DL,[DI]

MOV [SI],AL

INC DI

INC SI

LOOP A1

INT 03H

CODE ENDS

END START

1.5

STACK SEGMENT STACK

DW 64 DUP(?)

STACK ENDS

DATA SEGMENT

ORG 0600H

DATA1 DB ?

ORG 0610H

JIEGUO DB ?

DATA ENDS

CODE SEGMENT

ASSUME CS:CODE,DS:DATA START:MOV AX,DATA

MOV DS,AX

LEA SI,DATA1

LEA DI,JIEGUO

XOR CH,CH

MOV CL,04H

MOV DL,0AH

MOV DH,04H

A1:MOV AL,[SI]

AND AL,0FH

MOV BL,AL

MOV AL,[SI]

SHR AL,CL

MUL DL

ADD AL,BL

MOV [DI],AL

INC SI

INC DI

DEC DH

JNZ A2

JMP A3

A2:JMP A1

A3:INT 03H

相关文档
最新文档