delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/12/01/12:30:14

From: "lewi9908" <lewi9908 AT ghc DOT ctc DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: AT&T inline asm in DJGPP...
Date: Sun, 1 Dec 2002 09:19:22 -0800
Organization: Posted via Supernews, http://www.supernews.com
Message-ID: <uukh53j0eco0f1@corp.supernews.com>
References: <uuhr3lgi6qsc7f AT corp DOT supernews DOT com> <uuit0ko46e2k55 AT corp DOT supernews DOT com> <asd396$b6o$1 AT antares DOT lu DOT erisoft DOT se>
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
X-Complaints-To: abuse AT supernews DOT com
Lines: 43
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Ok problem 2) is fixed but problem 1) still doesn't work...

Here the code(Note the fix to problem 2) is in the code)

Ker.asm(built by NASM)
[BITS 32]

 GLOBAL _OutputText

_OutputText:
...
StartLoop:
 and byte [edx], 0x0                   ;Check for Null char
 jz short PrintDone
 mov byte al, [edx]
 mov byte [ebx], al
 add byte [ebx], 0x1
 add byte [edx], 0x1
 mov byte [ebx], 0x4f                ;Add new colors later
 add byte [ebx], 0x1

 jmp short StartLoop

PrintDone:
...

Ker.cpp(Also I am going to build a C++ kernel and not just a C kernel so I
need Ker.cpp)
extern "C" void OutputText(char* pOutStr, int iVideoMemIndex);

int main()
{
    OutputText("Hello, world!", 22);

    //Just comments here...
    return 0;
}

What is the problem now...

Any more help...


- Raw text -


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