Page 1 of 1

Recreating an IBM XT with batch programming

Posted: 29 Apr 2009 19:42
by alexquatermain
Hello everyone at Dos tips.

I grew up with my Dad's IBM XT computer (practically an antique even when I was little) and have been trying to "recreate" it with my brother for his next birthday.

I have got a copy of Dosbox and all the games and software I could find from the old XT, and have been trying to get everything looking as much like the old system as possible. The plan is to stick Dosbox on a usb keydrive and hide it inside an old 5 1/4" floppy drive.

The two things I remember about the XT boot sequence was the IBM logo and it checking the 16kb of ram (or whatever it was - it counted from 1 to 16000)

I was fairly confident with dos (for a kid) and as a designer now I have had experience of programming languages (HTML CSS Actionscript) but have never had to use batch in dos.

I understand I may be able to recreate the counting from 1 to 16000 using batch but have no clue where to start. Is this possible?

And although this is probably a long shot, is the IBM logo possible?

There is a screenshot at:

http://upload.wikimedia.org/wikipedia/c ... _color.jpg

Many thanks,
Alex

Posted: 30 Apr 2009 10:44
by avery_larry
bluesxman might have a cool idea you could manipulate for the countup:

http://www.ss64.org/viewtopic.php?id=659

The 4th post shows a changing display . . .


You could also do something really easy like:

Code: Select all

set cnt=0
:loop
cls
echo.%cnt%
if not %cnt%==16000 goto :loop

Posted: 30 Apr 2009 11:42
by davep
Maybe something like this?

Code: Select all

@echo off

for /l %%X in (1,1,16000) do (
   cls
   echo.%%X
   )
echo.
pause


The pause is optional, of course. Also, you can echo ASCII art for the IBM logo, but the screen will flicker a lot due to the very fast counting coupled with cls.

Posted: 01 May 2009 08:53
by alexquatermain
Ah, thanks guys, it seems Dosbox doesn't recognise those commands, they do say on the website that it is gaming oriented and they focus development on gaming features, so nevermind..

I'll look at ascii art for the IBM logo and see how that shows up..

One last thing, if you would be so kind, I have the following code in Dosbox's autoexec equivalent:

Code: Select all

[autoexec]
mount c ~/dos
c:
cls

TYPE C:start.txt


The start.txt has some additional stuff I have found from the XT environment, basically:

Code: Select all

Current date is Tue 1-01-1980
Enter new date:
Current time is 7:48:27.13
Enter new time:


The IBM Personal Computer DOS
Version 1.10 (C)Copyright IBM Corp 1981, 1982)


is it possible to show this without the command "TYPE C:start.txt" at the beginning?

Thanks again,

Alex

Posted: 01 May 2009 10:11
by davep
You just need another batch file with something like this:

Code: Select all

@echo off
type "C:\start.txt"
ping localhost -n 10 2>&1>nul


It should hang around for a few seconds and then close.

Posted: 01 May 2009 10:56
by avery_larry
In typical DOS, the @ symbol will "hide" the actual command. You could try that to see if Dosbox works the same way:

@TYPE C:start.txt

Posted: 04 May 2009 14:09
by alexquatermain
Oh wow, the @ trick works! It looks like a proper XT!

I will try the batch trick later, I'm very tired now, but thanks for all the ideas, this may actually work! :D