delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/11/02/09:02:17

From: Nassim Bouayad <nbouayad AT wanadoo DOT fr>
Newsgroups: comp.os.msdos.djgpp
Subject: Problems again with Djgpp and Nasm
Date: Fri, 29 Oct 1999 14:25:48 +0200
Organization: N/A
Lines: 86
Message-ID: <3819924C.5D2A@wanadoo.fr>
NNTP-Posting-Host: annecy-3-180.abo.wanadoo.fr
Mime-Version: 1.0
X-Trace: wanadoo.fr 941549172 10415 164.138.8.180 (2 Nov 1999 13:26:12 GMT)
X-Complaints-To: abuse AT wanadoo DOT fr
NNTP-Posting-Date: 2 Nov 1999 13:26:12 GMT
X-Mailer: Mozilla 3.04Gold (Win95; I)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi again,I have a problem again with nasm,here is the code of asm file :
_LoadPcx__FPc:   push ebp
                 mov ebp,esp
                 mov eax,[ebp+8]
                 mov dx,word [eax]   
                 mov ax,3dh 
                 int 0x21
	         cmp ax,0 
	         ret
		 push word 0xA000
		 pop es
		 mov bx,ax
		 xor cx,cx
		 xor dx,dx
		 mov ax,0x04202
		 int 0x021
		 sub ax,0x0300
		 xor cx,cx
		 mov dx,ax
		 mov ax,0x042
		 int 0x021
		 mov cx,0x0300
		 push di
.Loop0:
	push cx
	mov ax,0x03f
	mov cx,1
	mov dx,word RCD ;ERROR WHEN COMPILATION
	int 0x021
	mov ax,word [RCD]
	stosb
	pop cx
	loop .Loop0
	pop dx
	push bx
	mov ax,0x01012
	xor bx,bx
	mov cx,0x0100
	int 0x010
	pop bx
	mov ax,0x042
	xor cx,cx
	mov dx,0x080
	int 0x021
	xor di,di
.Loop1:
       mov ax,0x03f
       mov cx,1
       mov dx,word RCD :ERROR WHEN COMPILATION
       int 0x021
       mov ax,word [RCD]
       and ax,word 0x0c0
       cmp ax,word 0x0c0
       mov ax,word [RCD]
       je .Run
       stosb
       jmp .Cont
.Run:   

	sub ax,0x0c0
	push ax
	mov ax,0x03f
	mov cx,1
	mov dx,word RCD ;ERROR WHEN COMPILATION
	int 0x021
	pop cx
	rep stosb
.Cont:
	cmp di,0x0fa00
	jb .Loop1
	mov ax,0x03e
	int 0x021
        mov esp,ebp 
        pop ebp 
        ret 

[Section .data]

RCD db 0

The problem:
When I compile the source,there is errors that are the same :
COFF format doesn't support non 32 bits relocation.
Ok,but what register must I use to give the offset of RCD to the DOS
function?EDX instead of DX?Please help me again,
Thanks,

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019