Recent

Author Topic: WriteLn and DOSBox  (Read 370 times)

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1106
    • Burdjia
WriteLn and DOSBox
« on: April 05, 2021, 05:28:01 pm »
Not sure if it is a problem of Free Pascal or DOSBox, but WriteLn isn't working correctly in that emulator.  It does in Windows XP.

See next simple program:
Code: Pascal  [Select][+][-]
  1. program test;
  2. begin
  3.   WriteLn ('This is a test program.  Should write text in the console.');
  4.   WriteLn ('This is a test program.', '  Should write text in the console.')
  5. end.
  6.  
Compiling for DOS 32bit Go32V2 and executing in DOSBox it look like the attached file.  See that first WriteLn renders incorrectly, while second renders correctly.

Also see that heaptrc output has issues too.

Maybe that's why FPC doesn't work in DOSBox (internal error 2004121202)?
« Last Edit: April 05, 2021, 05:30:49 pm by Ñuño_Martínez »
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

lucamar

  • Hero Member
  • *****
  • Posts: 3773
Re: WriteLn and DOSBox
« Reply #1 on: April 05, 2021, 06:16:27 pm »
I can confirm that there is somethign fishy going on; see attached image (FPC 3.0.4 in DOSBox 0.74 under Linux x86_64)
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 850
Re: WriteLn and DOSBox
« Reply #2 on: April 05, 2021, 07:27:28 pm »
You may want to try DOSBox-X, which aims for compatibility with regular programs as well rather than just with games. I recently read something about issues with FPC's LFN support and DOSBos-X, but afaik other than that it works.

MarkMLl

  • Hero Member
  • *****
  • Posts: 2400
Re: WriteLn and DOSBox
« Reply #3 on: April 05, 2021, 07:45:33 pm »
I swear I've seen something like that before, but I've never used DOSBox, only DosEmu,

Lucamar's example is downright weird: every 4th column lost except for the vertical lines.

MarkMLl
Turbo Pascal v1 on CCP/M-86, multitasking with LAN and graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1106
    • Burdjia
Re: WriteLn and DOSBox
« Reply #4 on: April 05, 2021, 09:39:30 pm »
You may want to try DOSBox-X, which aims for compatibility with regular programs as well rather than just with games. I recently read something about issues with FPC's LFN support and DOSBos-X, but afaik other than that it works.
I didn't know about this project.  I should take a look. Thanks.

I can confirm that there is somethign fishy going on; see attached image (FPC 3.0.4 in DOSBox 0.74 under Linux x86_64)
Lucamar's example is downright weird: every 4th column lost except for the vertical lines.
That's just what happens with the installer.

And the same problem with FreeDOS. :(
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

 

TinyPortal © 2005-2018