|
主题 : : out of memory 问题怎么解决?? [待解决] |
回复[ 2次 ]
点击[ 482次 ] | |
荣誉值:0
信誉值:0
注册日期:2009-10-07 14:18 |
C:\>masm c:\uu.asm;
Microsoft (R) Macro Assembler Version 5.00
Copyright (C) Microsoft Corp 1981-1985, 1987. All rights reserved.
c:\uu.asm(70): Out of memory
代码部分
assume cs:code
data segment
db 10 dup(0)
data ends
code segment
start:mov ax,12666
mov bx,data
mov ds,bx
mov sp,bx
mov ss,0
mov si,0
call dtoc
mov dh,8
mov dl,3
mov cl,2
call show_str
mov ax,4c00h
int 21h
show_str: push ax
dec dh
dec dl
mov ax,0
mov al,dh
mov bx,0
mov bl,10
mul bl
mov bx,ax
mov ax,0b800h
add ax,bx
mov es,ax
mov ax,0
mov al,dl
add al,dl
mov bx,ax
mov di,0
ok: mov ch,cl
mov cl,[si]
push cx
mov ch,0
jcxz return
pop es:[bx+di]
add di,2
inc si
jmp short ok
return: ret
dtoc: mov cx,0ah
call divdw ;传入ax,cx的值进行除法运算
push cx ;传送div的返回值cx
inc di
mov cx,dx
jcxz goon
jmp short dtoc
goon: mov cx,0ah
call divdw
push cx
inc di
mov cx,ax
jcxz re_num
jmp short goon
re_num: mov si,0
mov cx,di
s: pop ax
mov bx,030h
add ax,bx
mov ds:[si],al
inc si
loop s
ret
divdw:
push bx ;程序的入口为送入ax,dx,cx取出cx
push ax ;记得要保存现场
mov ax,dx
div cl
mov bx,ax
mov ah,0
mov dx,ax
pop ax
push dx
mov dx,bx
mov dl,dh
mov dh,0
div cx
mov cx,dx
pop dx
pop bx ;恢复现场
ret
code ends
end start
masm 的时候出错了暂时不知道错在哪里问题先问在这里 | | |