Pure DOS compatable?

BlitzMax Forums/BlitzMax Programming/Pure DOS compatable?

Johnsprogram(Posted 2008) [#1]
I have been doing a test to see if i could create a small application to work in DOS. Well, it sort of work, but it doesn't in pure DOS mode.

Is there a way to create an app with BlitzMAX that work in pure DOS? (I'm using FreeDOS 1.0)


SebHoll(Posted 2008) [#2]
In short, no... Firstly, DOS applications are 16-bit (I think - I may be wrong about this though) and secondly, if you look at the EXEs BlitzMax generates with a hex-editor, the old backwards compatible DOS code simply prints a string of:

"This program cannot be run in DOS mode."


Azathoth(Posted 2008) [#3]
DOS can also be 32bit, but still pretty limited compared to full 32-bit Windows.
Anyway BlitzMax can't compile DOS apps, DOS is abit of a step backwards. If you really want to compile for DOS 32bit you can use DJGPP.

Edit: Don't expect the apps to work on the lastest versions of Windows without using a third party emulator.


Damien Sturdy(Posted 2008) [#4]
It would be nice to be able to compile an exe that will work just as IO.SYS runs before DOS does.

I wrote an OS installer that ran even without DOS. Having complete control over the hardware like this has many good advantages:

In this mode, you have direct control of the system, you can poke and peek RAM and therefore control any custom interfaces without buying or writing special controls for the OS of your choice.

if you are building a system with a specific purpose you may not need windows, only direct hardware access. :-)


Dreamora(Posted 2008) [#5]
BM is meant for games only and advertised as such, so no will never happen.


Azathoth(Posted 2008) [#6]
BM is meant for games only and advertised as such
Complete garbage. Its own IDE is written in BlitzMax, as is many of its other programs.


Dreamora(Posted 2008) [#7]
Yupp, but BM officially is for Games. Thats how BRL advertises it and thats what you get as answer whenever you put out that:

1. the IO core (for directory access etc) isn't even full ASCII compliant (only US characters), not talking of Unicode, even thought XP, Vista, Linux and OSX are unicode.

2. BM is not callback safe

...

BM is a great language but if you intend to do larger scale serious applications, forget it.
the IO core issue on its own guarantees that you can forget it as it can not even read the different european ascii characters in file paths ...


popcade(Posted 2008) [#8]
If you want write DOS program and like BASIC more, try FreeBASIC

http://www.blitzbasic.com/Products/_index_.php
BlitzMax ($80 USD - digital version)
Create 2D Games for Windows, MacOS and Linux.....

You can also write APP in DarkBASIC/3DGS/GameMaker etc btw...


Azathoth(Posted 2008) [#9]
I'm not saying it hasn't got issues, but saying it is only meant for games when many of the compiler tools are written in it is a contradiction. BRL does advertise it for 2D games, but no where will you read it is for 2D games only.


Azathoth(Posted 2008) [#10]
http://www.blitzbasic.com/Products/_index_.php
BlitzMax ($80 USD - digital version)
Create 2D Games for Windows, MacOS and Linux.....
There you go, no 3D (even though BRL is advertising Blitz3D SDK for BlitzMax).

You can also write APP in DarkBASIC/3DGS/GameMaker etc btw...
Even the creators of the compilers? You missed the part where a number of BlitzMax's own tools are written in Blitzmax.


popcade(Posted 2008) [#11]
Be more mature, you look lacking reason for this.

For exampole, XBLite was written in XBlite, PureBasic's libs and parser was writen in PureBasic, just same reason.

Btw, you're not Mark and can not express from him or state the situation of BlitzMax, it's your freedom to write anything wit it :)


Dreamora(Posted 2008) [#12]
Well you can use BM for tools as well, but if you run into problem due to its core "target" of beeing a game language you can either solve them yourself or look for a work around.

Sure BM can be used for anything, but thats the normal answer you will get by skidracer / mark here on the boards when you run into problems using BM for applications or if there is an ability that "any" application directed language has ... like unicode compliance and the like.


Azathoth(Posted 2008) [#13]
Be more mature, you look lacking reason for this.
Where have I been immature? I've backed up my reasoning with official examples, what have you done other than copy'n'paste and a flawed analogy with no official examples?

For exampole, XBLite was written in XBlite, PureBasic's libs and parser was writen in PureBasic, just same reason.
Both which are general purpose languages, not games languages.

Btw, you're not Mark and can not express from him or state the situation of BlitzMax, it's your freedom to write anything wit it :)
Mark has already shown Blitzmax is not just for games, look in the src folder.


Johnsprogram(Posted 2008) [#14]
Is QBASIC the way to go for creating games or is there a better IDE for DOS?


Ziltch(Posted 2008) [#15]
Just because BM can be used to write games, does not make it a exclusive games only language.

Create 2D Games for Windows, MacOS and Linux....

Does not mean

Can only Create 2D Games for Windows, MacOS and Linux....

or

Designed to only Create 2D Games for Windows, MacOS and Linux....


Dreamora(Posted 2008) [#16]
yupp it does not, its meant for games and game editors.
If you do something else its simple: it means that you don't get "official support" from BRL for the other aspects if you have problems and have little chance in seeing fixes in that sector unless BRL needs them for their own modules.
That simple it is.

BM is advertised for gaming and its development is mainly targeted at that. Other things might work but might just not work as well and then its up to you to modify BMs core modules, BMK and the like.

but thats the great thing, you are able to change anything but the compiler actually :)


D4NM4N(Posted 2008) [#17]
I used to use Turbo pascal 7 and a lib called anivga 1.2 (still kicking around.

Worked very nicely in DOS.


tonyg(Posted 2008) [#18]
yupp it does not, its meant for games and game editors.
If you do something else its simple: it means that you don't get "official support" from BRL for the other aspects if you have problems and have little chance in seeing fixes in that sector unless BRL needs them for their own modules.


Where did you get this little nugget of knowledge from?


Dreamora(Posted 2008) [#19]
From the about 1xx postings long thread on "why the heck does BM only support ANSI in file paths, no ASCII (-> no european characters like those in german, french, spanish, nordish languages or portuguese) or even Unicode as any OS available today is Unicode compliant"


Russell(Posted 2008) [#20]
If you're dead-set on writing programs/games for DOS, I know MS-Dos comes with QBasic, and there are compilers for it somewhere on the internet, for sure.

There are many reasons to like Dos (total control of system, super fast because only your program - and perhaps some TSRs - are running), but many reasons to not like it, too...(16 bit, segmentation craziness, etc).

What are your reasons for wanting to write for Dos? If it is for some specialized system (perhaps you are creating an in-dash control panel for your car, etc), then you should probably learn C and use DJGPP (which is free) or one of the many other C compilers for Dos out there.

Russell


tonyg(Posted 2008) [#21]
From the about 1xx postings long thread on...
and in this post somebody from BRL stated there is only support for game related issues?


Azathoth(Posted 2008) [#22]
Unlike a majority of games languages including Blitz3D, Blitzmax allows you to omit the core modules. If BlitzMax was games only, logically it would include the 2D module no matter what.


Czar Flavius(Posted 2008) [#23]
Enough with the what BlitzMax is or isn't arguing, it doesn't actually make any difference :)


tonyg(Posted 2008) [#24]
Enough with the what BlitzMax is or isn't arguing, it doesn't actually make any difference :)

I disagree. OK, it would make MORE of a difference in a topic titled 'Can Bmax be used to create applications?'. However, if inaccurate statements weren't, at least, challenged then the site would be strewn with falsehoods.


Winni(Posted 2008) [#25]
Johnsprogram, if you need a powerful Basic compiler for DOS, try PowerBASIC. I've written business software with it in the past, it works great and is ultra-fast.
http://www.powerbasic.com/


Dreamora(Posted 2008) [#26]
tonyg: yes that was stated by skidracer when it was asked why the core IO is ANSI, not ASCII or Unicode (especially as blitz has unicode strings)


D4NM4N(Posted 2008) [#27]
By the way,

I just found out that Turbo Pascal 7 is now freeware, its very easy to learn and would reccomend it highly for DOS/much older machines.
There are loads of 3rd party 2D & sound libs available (like anivga sprite system)


Winni(Posted 2008) [#28]
You can also use FreePascal instead of Turbo Pascal: It's a true multi-platform product and Open Source.


*(Posted 2008) [#29]
I used to use Turbo C/C++, went from Turbo Pascal to C :D