. : : Assembly Language : : .  |  首页  |  我提出的问题  |  我参与的问题  |  我的收藏  |  消息中心   |  游客  登录  | 
刷新 | 提问 | 未解决 | 已解决 | 精华区 | 搜索 |
  《汇编语言》论坛 ->自由讨论区
  管理员: assembly   [回复本贴] [收藏本贴] [管理本贴] [关闭窗口]
主题 : :  out of memory 问题怎么解决??  [待解决] 回复[ 2次 ]   点击[ 482次 ]  
thedaydreamwang
[帖 主]   [ 发表时间:2010-01-31 19:20 ]   [引用]   [回复]   [ top ] 
荣誉值: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 的时候出错了暂时不知道错在哪里问题先问在这里
mess
[第1楼]   [ 回复时间:2010-02-01 10:18 ]   [引用]   [回复]   [ top ] 
荣誉值:337
信誉值:0
注册日期:2008-01-01 17:48
先找到70行。

push bx   ;程序的入口为送入ax,dx,cx取出cx 
------------
这里是70行,错误时注释用了中文分号。
thedaydreamwang
[第2楼]   [ 回复时间:2010-02-01 17:50 ]   [引用]   [回复]   [ top ] 
荣誉值:0
信誉值:0
注册日期:2009-10-07 14:18
经典我没注意反回值70呵呵明白了!!
需要登录后才能回帖 -->> 请单击此处登录
    Copyright © 2006-2024   ASMEDU.NET  All Rights Reserved