Turbo Pascal code worked, but...
#1
Posted 14 May 2003 - 10:23 PM
I finally acquired an SB-87 cable, and downloaded the Calipso (cool!) and FA 123 software. I decided to check if Pascal compiled code runs on AFX. I wrote the simple code:
uses CRT;
begin
clrscr;
write('Hello world');
for n:=1 to 100000 do;
end.
(Turbo Pascal 7.0)
Although straightforward, I should explain that this program should clear the screen, print 'Hello world' on the screen, and pause for a few seconds. I packaged the hello.exe file into hellowor.cfx using Calipso and loaded this into AFX with FA123. It succesfully took its place in the main menu of the AFX with the default Calipso icon. When executed, nothing appeared on the LCD but the unit paused for a period approximately as I calculated for an 8 MHz 286. I then changed the iteration value to 200000, and it paused for twice as it did for 100000.
This proves that Pascal generated .exe programs really works on the AFX, except for screen I/O (and probably for many other things!).
Could anyone tell me how I can get around this? Should I write directly on video RAM? Where is it in the memory?
#2
Posted 15 May 2003 - 12:05 AM
#3
Posted 15 May 2003 - 09:44 AM
#4
Posted 15 May 2003 - 02:02 PM
make the screen access and everything else in asm or c?
the programs are a big deal larger and slower!
#5 Guest_Bytefish Productions_*
Posted 15 May 2003 - 05:00 PM
/edit: i meant you cant run pascal files on the afx.
and hi roeoender.
#6
Posted 15 May 2003 - 06:59 PM
I'd like to thank 2072 for the address!
Pascal is very well capable of doing great job all in itself, and I don't think I will delve into asm or anything for simple memory I/O routines. That's the crucial point here.. I assume any compiler that generates real mode DOS executables will be okay.
After Pascal, there comes the time for PROLOG, my favorite
Thank you all. Now I have to deal with some peeking poking..
#7
Posted 16 May 2003 - 06:24 AM
the advantage of turbo C is that he uses current DOS routines to write on the screen
#8
Posted 16 May 2003 - 08:37 AM
- not use CRT
- or disable direct video access (put "directvideo:=false;" to the beginning of the program)
this would force I/O routines to use DOS handler.
#9
Posted 16 May 2003 - 01:38 PM
#10 Guest_Bytefish Productions_*
Posted 16 May 2003 - 04:18 PM
#11
Posted 16 May 2003 - 04:42 PM
assembly will naturally reign superior in both compactness, and speed of exectution.. however, it can be very time consuming when it comes to developement
as for C, it's a very compact, and efficient language, and lets you mess around with anything you want (so no limitations)
C++ adds objects and all that stuff, so programs increase in size, and speed of exectution is slower (that is, if you take use of the c++ features). For the calc I would stick with pure C over C++.. though, if you really wanna go all the way, assembly is the thing
#12
Posted 16 May 2003 - 06:55 PM
I know that assembly it?s the best for the calc, see for example the platinum, a very good game in a very small size?.
#13
Posted 16 May 2003 - 07:00 PM
In normal computer programing it's not of much use. It's time consuming, and you usually have tons of clock cycles to waste anyway
Only in rare cases, operating systems, compilers, special algorithms, inner loops, and games developement (espacially for console) do you see assembly programming nowadays
#14
Posted 16 May 2003 - 10:06 PM
I want to be sure of my decision to not find in the end that I loose my time?..
And that I don?t make a GREAT friend lose his time to teach me?.
#15
Posted 16 May 2003 - 11:01 PM
So learn C, C++ is usefull for HUGE programs where you have a very complex organization but C is better for programs like we do on AFX.
#16
Posted 17 May 2003 - 06:56 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users