汇编代码求除法的商和余数

 

;Program:
;Author:
;Date:

.386
.MODEL FLAT

ExitProcess PROTO NEAR32 stdcall, dwExitCode:DWORD

INCLUDE io.h            ; header file for input/output

cr      EQU     0dh     ; carriage return character
Lf      EQU     0ah     ; line feed

.STACK  4096            ; reserve 4096-byte stack

.DATA                   ; reserve storage for data
stri	BYTE	20 DUP	(?)	;被除数输入
strj	BYTE	20 DUP	(?)	;除数输入
numi	DWORD	10 DUP	(?)     ;被除数
numj	WORD	10 DUP	(?)	;除数
prompti	BYTE	"enter the dividend:", 0
promptj	BYTE	"enter the divisor:", 0
promptk	BYTE	"The quotient is "
shang	BYTE	10 DUP	(?)
promptl	BYTE	", and the remainder is"
yu	BYTE	10 DUP	(?), 0
sum	BYTE	11	DUP	(?)
	BYTE	cr,	Lf,	0



.CODE                           ; start of main program code
_start:
output	prompti
input	stri, 20
output	promptj
input	strj, 20
atoi	strj		;除数放进ax中
mov     cx, ax		;除数放进cx中
atod 	stri		;被除数放进eax中
idiv	cx		;eax除以numj
cwde
mov	bx, ax		;商放进bx中
mov	ax, dx		;余数放进ax中
itoa 	yu, ax
itoa	shang, bx
output	promptk


        INVOKE  ExitProcess, 0  ; exit with return code 0
PUBLIC _start                   ; make entry point public

END                             ; end of source code

用上面的程序求商和余数,可为什么结果输不出来

43行的cwde改为cwd