delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/11/16/10:40:04

Message-ID: <01BCF2B6.1FD120A0@user-9-87.dial.inet.fi>
From: "Risto J. Sutinen" <risto DOT sutinen AT pp DOT inet DOT fi>
To: "'djgpp AT delorie DOT com'" <djgpp AT delorie DOT com>
Subject: Could someone help me with Nasm module linking?
Date: Sun, 16 Nov 1997 17:35:47 +-200
MIME-Version: 1.0

I have tryed to compile and link following source files using Nasm and DJGPP. So far I have got only error messages. What the heck is wrong?? Someone help me out please!





Fillscrn.ASM:

[BITS 32]

[EXTERN _color]

[GLOBAL _Fillscrn(int color)]

[SECTION .text]

;prototype: Fillscrn(int color);


_Fillscrn:
        push    ebp
	mov	ebp, esp
	
        mov     ax, 0A000h
        mov     es, ax
        xor     di, di

        mov     cx, 320*200/2
        mov     al, _color 
        mov     ah, al
        rep     rep stosw

        pop     ebp
	ret

[SECTION .data]


FllScrnc.cpp:

#include <go32.h>
#include <sys/farptr.h>
#include <conio.h>
#include <stdio.h>


#define VGA256 0x13
#define TEXT_MODE 0x03


extern void Fillscrn(int color);                


void main(void)
{
        int t;

        // Aseta n?ytt"tila 320*200*256
        textmode(VGA256);

        // T?yt? n?ytt" 1:ll?
        for (t=0; t<1000; t++)
        void Fillscrn(t);

        // Odota n?p?imen painallusta
        while(!kbhit()) {}

        // Palaa tekstitilaan
        textmode(TEXT_MODE);
}




- Raw text -


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