john at jcoppens.com
Thu May 5 07:00:02 CEST 2005
On Thu, 5 May 2005 09:19:27 +0530
"Anandu R Suri" <zmatrix13 at flashmail.com> wrote:
> I am writing an operating system using your Free Pascal Compilier
> 1.0.10. Most of my code is based on the IA32 opcodes in $ASMMODE INTEL.
> I have two problems, both are of importance.
> 1. The very basic problem is with the video driver. Whenever I try to
> write to the Video memory either there is no reponse, or I receive a
> run time error 216. I tried all possibilities of using an absolute
> array, pointers, and even FillWord, nothing works out.
Are you sure the video card is in text mode? The code you're using is
very specific to 16-bit IBM-like PCs explicitly in mode 3 (color, 80x25).
If you are in 32- bit mode, the memory will probably be elsewhere and
text mode can even be emulated by graphics. If you want the program to be
more or less portable you shouldn't be accessing the video directly. Use
INT 10 functions.
> 2. Since my Operating System will be Object Oriented, the compilation
> consists of calling a FPC_HELP_CONTRUCTOR which in turn calls the built
> in AsmGetMem function. But during the system initialization process
> there will be no memory manager. Is there a possiblity of constructing
> an object at a predetermined location like in C++?
> Var x, y: Byte
> Procedure ClrScr; Assembler; [Public, Alias: 'CLRSCR'];
> mov edi, $B8000
> mov eax, $07200720
> mov ecx, 2000
> mov x, 0
> mov y, 24
> This piece of code always gives a RTE 216.
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
More information about the fpc-pascal