Programming Turbo C

0 views
Skip to first unread message

Stephani Kapnick

unread,
Aug 5, 2024, 1:39:44 PM8/5/24
to giacheacomu
fromthe main MolecularIntegrals.jl installation. Currently I just add the @turbo commands to the relevant for-loops and re-time, since the vrr! routine is several calls down in the integral code. But if you think a clear comparison is important, I can make _turbo versions of all these routines. Let me know.

Yes, I was going to ask if the vrr! call you were benchmarking was really representative of the typical call.

For one thing, I noticed that in your actual code it gets called with SVector instead of Vector arguments.


@turbo speeds things up be evaluating multiple loop iterations in parallel using SIMD instructions.

For this to speed things up, we need multiple loop iterations.

Of course, @simd works the same way, but both macros make different trade offs in terms of performance as a function of the number of loop iterations.

Here is a very simple example, just using a sum:


Some follow-up questions, because I am new to programming and am at the first step, executing Hello World, does the recommendation for a frequency of 3GHz or more apply to me? Or could I settle for a lower processing speed?


Now, this does stretch my laptop, as well as my patience, because something like serving the fCC platform takes up to 20min for the server to start up, and a clean install takes over 30min. Then there are Solidworks simulations that take hours for simple geometries to complete.


Hi,

I'm currently trying to make a program to run a 6.0 ford powerstroke turbo on my truck. the turbo requires a pwm signal to run it if anyone could help that would be much appreciated. I've been messing with tinkercad trying to make a basic idea of how it will work an example of what i would need to do is a 0-5v input to a 5-0v output so as my input voltage goes up my output voltage goes down. the turbo vanes being vgt are closed at 5v for example and open at 0v. ive tried to use a pot and led as my test on tinker cad but cant get it to be like i said, any help would be nice thank you.


You'd need to verify the frequency the VGT actuator requires. I want to say it's in the 25-40Hz range. This can be easily accomplished by using one of the hardware timers in the AVR (assuming an Uno or Mega etc)


The harder thing is to know what DC (duty cycle) to command. In the OE application, it's probable the DC is determined using a bunch of parameters including manifold pressure, coolant and intake air temperature, engine RPM, commanded throttle percent (i.e. fuel control), transmission gear, vehicle speed etc.


Do you have access to an oscilloscope? This would be best.

As it is a pwm-signal such a $10 24 MHz 8 channel logic analyser would do too

Just a randomly choosen shop


choose a shop you trust


Is the 0 to 5V pwm-signal comming from the motor-control-unit? I have zero experience with customising turbo-chargers. I'm pretty sure that there is a online-scene for your kind of truck with a user-forum for things like that. Did you ask there if somebody has experience with this?


Analog Read returns a value from 0 to 1023 as the voltage on the pin goes from 0 to 5V (assuming a 5V Arduino). Divide by 4 to get a value from 0 to 255. Subtract from 255 to get a value from 255 to 0. Apply that to a PWM output pin.


thank you for the help i copied and pasted what you provided into tinkercad and it seems the led is getting to much amperage on there, so it doesnt seem to completely work on there but i looked at it on the website you provided as well and it works which i appreciate. how much amperage can the my actual Arduino take? cause i heard somewhere its only 20 or so. another one of my questions is it is possible to add a switch to command the vanes all the way closed or all the way open cause in the end id like an exhaust brake feature as well.

thank you for the help


I tried to add a 1k resistor with no luck, ill look into the amplifier like you said and see what I can find, I appreciate the help and yeah that's prolly what ill do is just make sure everything goes ok then go from there I'm still waiting on parts to try it with my Arduino anyway. if anything happens ill make sure to post it here. is there a way to use a multimeter on that site so i can see what the voltages are at?


The cheap way is:

asking a lot in the arduino-Forum.

There is a general electronics subforum for questions about what the name says:

general electronics.

You can post simple questions like how less milliamperes can an Arduino-IO-Pin deliver? here in the programming questions subforum. More special questions in the electronics-forum with a link to this thread.

You should provide a datasheet of your VGT voltage, current-consumption of the VGT are very important data to decide which "amplifier" to use to drive the VGT


Turbo Pascal is a software development system that includes a compiler and an integrated development environment (IDE) for the programming language Pascal running on the operating systems CP/M, CP/M-86, and DOS. It was originally developed by Anders Hejlsberg at Borland, and was notable for its very fast compiling. Turbo Pascal, and the later but similar Turbo C, made Borland a leader in PC-based development tools.


For versions 6 and 7 (the last two versions), both a lower-priced Turbo Pascal and more expensive Borland Pascal were produced; Borland Pascal was oriented more toward professional software development, with more libraries and standard library source code. The name Borland Pascal is also used more generically for Borland's dialect of the language Pascal, significantly different from Standard Pascal.


Philippe Kahn first saw an opportunity for Borland, his newly formed software company, in the field of programming tools. Historically, the vast majority of programmers saw their workflow in terms of the edit/compile/link cycle, with separate tools dedicated to each task. Programmers wrote source code using a text editor; the source code was then compiled into object code (often requiring multiple passes), and a linker combined object code with runtime libraries to produce an executable program.


Kahn's idea was to package all these functions in an integrated programming toolkit designed to have much better performance and resource utilisation than the usual professional development tools, and charge a low price for a package integrating a custom text editor, compiler, and all functionality need to produce executable programs. The program was sold by direct mail order for US$49.95, without going through established sales channels (retailers or resellers).[6]


The Turbo Pascal compiler was based on the Blue Label Pascal compiler originally produced for the NasSys cassette-based operating system of the Nascom microcomputer in 1981 by Anders Hejlsberg. Borland licensed Hejlsberg's "PolyPascal" compiler core (Poly Data was the name of Hejlsberg's company in Denmark), and added the user interface and editor. Anders Hejlsberg joined the company as an employee and was the architect for all versions of the Turbo Pascal compiler and the first three versions of Borland Delphi.[3]


The compiler was first released as Compas Pascal for CP/M, and then released on 20 November 1983[2] as Turbo Pascal for CP/M (including the Apple II fitted with a Z-80 SoftCard, effectively converting the 6502-based Apple into a CP/M machine, the Commodore 64 with CP/M cartridge, and the later DEC Rainbow), CP/M-86, and DOS machines. On its launch in the United States market, Turbo Pascal retailed for US$49.99, a very low price for a compiler at the time. The integrated Pascal compiler was of good quality compared to other Pascal products of the time.[7]


The Turbo name alluded to the speed of compiling and of the executables produced. The edit/compile/run cycle was fast compared to other Pascal implementations because everything related to building the program was stored in RAM, and because it was a one-pass compiler written in assembly language. Compiling was much faster than compilers for other languages (even Borland's own later compilers for C),[citation needed] and other Pascal compilers, and programmer time was also saved since the program could be compiled and run from the IDE. The execution speed of these COM-format programs was a revelation for developers whose only prior experience programming microcomputers was with interpreted BASIC or UCSD Pascal, which compiled to p-code which was then interpreted at runtime.


Unlike some other development tools, Turbo Pascal disks had no copy protection. Turbo Pascal came with the "Book License": "You must treat this software just like a book ... [it] may be used by any number of people ... may be freely moved from one computer location to another, so long as there is no possibility of it being used at one location while it's being used at another."[8]


Borland sold about 250,000 copies of Turbo Pascal in two years, which Bruce F. Webster of Byte described as "an amazing figure for a computer language".[9] He reported six months later that the figure had risen to "more than 400,000 copies in a marketplace that had been estimated as having only 30,000 potential buyers".[10]


Jerry Pournelle wrote in the magazine in February 1984 that Turbo Pascal "comes close to what I think the computer industry is headed for: well documented, standard, plenty of good features, and a reasonable price". He disliked the requirement to buy another license to distribute binaries, but noted that "it turns out not to be a lot more. Borland only wants another $100" more than the $49.95 base price, and that "my first impression of Turbo is that it's probably worth $149.95. It looks to do everything MT+ with the Speed Programming Package does, and maybe even do it faster and better".[11] Pournelle reported in July that, according to Kahn, IBM had refused to resell Turbo Pascal unless the price was at least $200; he noted that "Turbo is much better than the Pascal IBM sells", and unlike the latter was compatible with the IBM PCjr.[12] Three Byte reviewers praised Turbo Pascal in the same issue. One reviewer said that because of dialect differences "Turbo is not really Pascal. But it's very useful". While cautioning that it was not suitable for developing very large applications, he concluded that Turbo Pascal "is well written, fun to use at times, and fast enough to make up for its few shortcomings ... it is a bargain that shouldn't be passed up". A second called the DOS version "without doubt, the best software value I have ever purchased", while a third said that Borland "deserves praise for" the "high-value" CP/M version.[13]

3a8082e126
Reply all
Reply to author
Forward
0 new messages