Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 05 Oct 1998 18:13:51 -0600
From:      Brett Glass <brett@lariat.org>
To:        Eivind Eklund <eivind@yes.no>, chat@FreeBSD.ORG
Subject:   Re: Pascal for Linux won't work on FreeBSD.... Why?
Message-ID:  <4.1.19981005180601.041b4e00@mail.lariat.org>
In-Reply-To: <19981006014611.35325@follo.net>
References:  <4.1.19981005170436.04226870@mail.lariat.org> <4.1.19981005170436.04226870@mail.lariat.org>

next in thread | previous in thread | raw e-mail | index | archive | help
At 01:46 AM 10/6/98 +0200, Eivind Eklund wrote:
 
>First guesses: You've not loaded the Linux emulator, or it is trying
>to execute more ELF binaries after having run that one.

Turns out it was a little more complex than that, but I managed to
get it to run. However, it generated code that the FreeBSD version of
as didn't like for some reason. For example, when I entered the program

program Hello;
begin
Writeln('Hello, world!');
end.

it spewed a whole bunch of bogus output (see below) and then died. Is
there something wrong that's obvious from what's below? It'd be really
nice to compile some of my old Turbo Pascal to run on FreeBSD.

--Brett

Free Pascal Compiler version 0.99.8 [1998/09/29] for i386
Copyright (c) 1993-98 by Florian Klaempfl
Target OS: Linux-i386
Compiling hello.pas
Assembling hello
pushl %ebp: template  1 operands opcode 55
    #1 type r16, r32,
  modrm:  mode 0  reg 0  reg/mem 0 base 0  index 0  scale 0
    #1:  r32,
ebp
movl %esp,%ebp: template  2 operands opcode 89 DW
    #1 type r8, r16, r32,
    #2 type r8, r16, r32, Mem8, Mem16, Mem32, BaseIndex, d8, d16, d32,
  modrm:  mode 3  reg 4  reg/mem 5 base 0  index 0  scale 0
    #1:  r32,
esp
    #2:  r32,
ebp
subl $4,%esp: template  2 operands opcode 83 ext 5
    #1 type i8s,
    #2 type r16, r32, Mem16, Mem32, BaseIndex, d8, d16, d32,
  modrm:  mode 3  reg 5  reg/mem 4 base 0  index 0  scale 0
    #1:  i8s,
    segment       absolute
    add_number    4 (4)
    #2:  r32,
esp
call INIT$$SYSLINUX: template  1 operands opcode e8
    #1 type d32,
  modrm:  mode 0  reg 0  reg/mem 0 base 0  index 0  scale 0
    #1:  d32,
    segment       unknown
    add_number    0 (0)
    add_symbol    INIT$$SYSLINUX type unknown
leal U_SYSLINUX_OUTPUT,%edi: template  2 operands opcode 8d
    #1 type Mem16, Mem32, BaseIndex, d8, d16, d32,
    #2 type r16, r32,
  modrm:  mode 0  reg 7  reg/mem 5 base 0  index 0  scale 0
    #1:  Mem32, d32,
    segment       unknown
    add_number    0 (0)
    add_symbol    U_SYSLINUX_OUTPUT type unknown
    #2:  r32,
edi
movl %edi,-4(%ebp): template  2 operands opcode 89 DW
    #1 type r8, r16, r32,
    #2 type r8, r16, r32, Mem8, Mem16, Mem32, BaseIndex, d8, d16, d32,
  modrm:  mode 1  reg 7  reg/mem 5 base 0  index 0  scale 0
    #1:  r32,
edi
    #2:  Mem32, BaseIndex, d8, d32,
    segment       absolute
    add_number    -4 (fffffffc)
pushl $.L5: template  1 operands opcode 68
    #1 type i16, i32,
  modrm:  mode 0  reg 0  reg/mem 0 base 0  index 0  scale 0
    #1:  i32,
    segment       unknown
    add_number    0 (0)
    add_symbol    .L5 type unknown
pushl -4(%ebp): template  1 operands opcode ff ext 6
    #1 type r16, r32, Mem16, Mem32, BaseIndex, d8, d16, d32,
  modrm:  mode 1  reg 6  reg/mem 5 base 0  index 0  scale 0
    #1:  Mem32, BaseIndex, d8, d32,
    segment       absolute
    add_number    -4 (fffffffc)
pushl $0: template  1 operands opcode 6a
    #1 type i8s,
  modrm:  mode 0  reg 0  reg/mem 0 base 0  index 0  scale 0
    #1:  i8s,
    segment       absolute
    add_number    0 (0)
call WRITE_TEXT_STRING: template  1 operands opcode e8
    #1 type d32,
  modrm:  mode 0  reg 0  reg/mem 0 base 0  index 0  scale 0
    #1:  d32,
    segment       unknown
    add_number    0 (0)
    add_symbol    WRITE_TEXT_STRING type unknown
pushl -4(%ebp): template  1 operands opcode ff ext 6
    #1 type r16, r32, Mem16, Mem32, BaseIndex, d8, d16, d32,
  modrm:  mode 1  reg 6  reg/mem 5 base 0  index 0  scale 0
    #1:  Mem32, BaseIndex, d8, d32,
    segment       absolute
    add_number    -4 (fffffffc)
call WRITELN_END: template  1 operands opcode e8
    #1 type d32,
  modrm:  mode 0  reg 0  reg/mem 0 base 0  index 0  scale 0
    #1:  d32,
    segment       unknown
    add_number    0 (0)
    add_symbol    WRITELN_END type unknown
call __EXIT: template  1 operands opcode e8
    #1 type d32,
  modrm:  mode 0  reg 0  reg/mem 0 base 0  index 0  scale 0
    #1:  d32,
    segment       unknown
    add_number    0 (0)
    add_symbol    __EXIT type unknown
leave: template  0 operands opcode c9
  modrm:  mode 0  reg 0  reg/mem 0 base 0  index 0  scale 0
ret: template  0 operands opcode c3
  modrm:  mode 0  reg 0  reg/mem 0 base 0  index 0  scale 0
Linking hello
Warning: Error while linking
Closing script ppas.sh
4 Lines compiled, 0.0 sec


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-chat" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4.1.19981005180601.041b4e00>