That's their market.
The command line is handy sometimes. Typing is faster than keying a 1- baud serial interface with your finger; higher bandwidth, and more precise.
Cheers, James Arthur
That's their market.
The command line is handy sometimes. Typing is faster than keying a 1- baud serial interface with your finger; higher bandwidth, and more precise.
Cheers, James Arthur
On Wed, 20 Aug 2008 15:35:16 GMT, Jan Panteltje wrote:
No. My code gets done fast, runs fast, takes little resourses, is exaustively documented, is very easy to maintain and extend, is bug-free, and I formally release the code and the entire tool chain together. I suppose I could do that in C, too, but C is just too ugly.
writing
Writing should be done slowly and carefully. Most C coding is typed quickly and then dominated by bug finding and fixing. Runtime speed is rarely a big deal on multi-GHz processors.
Tell Microsoft.
There are no graceful exits in embedded systems. Exit == broken.
lines);
C is crap, and the vast majority of C programs are crap.
Your program has not a single comment, no indication of purpose, version, usage, authorship, limitations, or context. It looks like monkeys pounding on typewriters, and is literally "code" in the sense that it would have to be decoded character-by-character for anyone (including yourself, a few months from now) to understand what it does. If it were non-trivial, or important, all this would be much worse.
.TITLE "28E346 REV A : T344/T346-1 WAVEFORM GENERATOR"
.CPU "68332.TBL" ; ASSEMBLE FOR THE MC68332 CPU .HEX "MOT16" ; GENERATE 'S28' HEX FILE
.SBTTL . **** T344/T346 EMBEDDED WAVEFORM GENERATORS **** .SBTTL . .SBTTL . BY JOHN LARKIN HIGHLAND TECHNOLOGY, INC .SBTTL . .SBTTL . August 8, 2008 .SBTTL . .SBTTL . COPYRIGHT HIGHLAND TECHNOLOGY, INC .SBTTL . .SBTTL . CAUTION: A6 IS RESERVED FOR XCOM, THE COMMAND PARSER .SBTTL .
; HARDWARE ASSEMBLY PCB 28A346 REV A TOP ASSY T346A ; CPU TYPE MC68LK332ACPV16 (TPU MASK SET 'A') ; CPU CLOCK EXTAL, 20 MHZ, OVERCLOCKED ; RAM 2K BYTES, CPU INTERNAL ; ROM TYPE 27C4001 4M-BIT (512K BYTES)) ; FPGA XC3S1500 PROGRAMMED 28C346B.RBT ; EEPROM NM93C86A 16 KBITS
.SBTTL PROGRAM ID AND VERSION
CODE = 28346 ; PROGRAM ID, FOR HARDWARE REV A REV = "A" ; AND CODE VERSION
CTCODE = 28344 ; CAL TABLE ID CODE, T344 COMPATIBLE! DCCODE = 28346 ; CONFIGURATION VALID CODE
; THIS CODE IS USED ON BOTH THE T344 AND T346 PRODUCTS. ; CAL TABLE ENTRY C_OPT CUSTOMIZES THE VERSION. ; SERIAL OUTPUT CHARACTER "~" BECOMES "4" OR "6"
; HELP TEXT, SILLY, ROM CHECKSUM, AND THE FPGA CONFIG CAN BE PAST THE ; 32K BOUNDARY, SO NEED LONG ADDRESSING. ALL ELSE IS OK IN WORD MODE.
; REV A JULY 2008 FOR T344A AND T346A ; FPGA IS 28C346B ;
.SBTTL BUILD AND MAINTENANCE PROCEDURES
; KEY PROJECT FILES AND PROGRAMS INCLUDE... ; ; 28E346x.MAC uP FIRMWARE SOURCE CODE, REX x ; 28C346x.RBT XILINX FPGA CONFIGURATION FILE ; ; GO.BAT BATCH FILE TO ASSEMBLE AND BUILD EVERYTHING ; ; PREP32.EXE SOURCE FILE PREPROCESSOR ; C32C.EXE CROSS ASSEMBLER (UNIVERSAL CROSS ASSEMBLERS INC) ; 68332.TBL OPCODE DEFINITIONS FOR C32C ; POST32.EXE LISTING FILE POSTPROCESSOR ; BRICK.EXE ROM IMAGE BUILDER ; ICD32.EXE BACKGROUND DEBUG PROGRAM ; ; 28E346x.ROM BURNABLE PRODUCTION ROM FILE ; (INCLUDES uP CODE AND XILINX CONFIG TABLE) ; ; TO PROCESS THE SOURCE FILES INTO A PRODUCTION ROM, ; JUST SAY... GO ; ; THIS WILL, IN SEQUENCE, INVOKE... ; ; PREP32 SOURCE PREFORMATTER MAKES 28E346x.ASM ; C32C UCA CROSS ASSEMBLER MAKES 28E346x.HEX, .LUG ; POST32 LISTING FORMATTER MAKES 28E346x.LST ; BRICK ROM FILE BUILDER MAKES 28E346x.ROM ; ; ; ALL FILES ARE RELEASED TO M:\\LIB\\SOFTWARE\\28346\\28E346x. IF ANY ; CHANGES ARE MADE WHICH AFFECT THE FIRMWARE EPROM IN ANY WAY ; (INCLUDING CHANGES TO THE uP CODE OR TO THE XILINX CHIP), THE ; REVISION LETTER OF THIS CODE MUST BE ROLLED AND A NEW VERSION ; RELEASED INTO A NEW LIBRARY SUBDIRECTORY.
.SBTTL GENERAL DEFINITIONS
etc
and somewhat later on,...
.SBTTL MAIN PROGRAM LOOP
; USUAL LOOP TIME IS BALLPARK 25 USEC.
MAIN: MOVEA.L # STACK, SP ; RELOAD OUR STACK POINTER! MOVE.W # 2000h, SR ; RUN IN SUPER MODE, PRIORITY 0 ; CHANGE TO 2700 TO BLOCK ALL INTERRUPTS ; 2400 TO ALLOW QSPI, BLOCK TPU CLR.W QUIET.W ; MAKE SURE SERIAL OUTPUT IS ENABLED MOVE.W # 0303h, GREEN.W ; DO HEARTBEAT BLINK, AT 1 HZ
BASS: ADDQ.W # 1, SLOPPY.W ; ABOUT EVERY 1.5 SECS, BCS.S PUPPY ; CHECK THE POWER BVC.S MERLIN ; AND DITTO JSR AZERO.W ; RE-ZERO THE ADC BRA.S SCAR ;
PUPPY: JSR POWER.W ; CHECK THE POWER SUPPLY BRA.S SCAR ; (TAKES ABOUT 600 USEC)
; RECOMPUTE THE ERROR FLAGS WORD
MERLIN: CLR.L D4 ; ZAP FLAGS-TO-BE CMPI.W # CTCODE, CALTBL.W ; IS CAL TABLE LEGIT? BEQ.S MERGE ; YES, SKIP ORI.W # CTERR, D4 ; NO, SET ERROR FLAG
MERGE: OR.W BSFLAG.W, D4 ; INCLUDE BIST ERRORS OR.W AZFLAG.W, D4 ; AND ADC ZERO ERROR OR.W PSFLAG.W, D4 ; AND +12 ERROR OR.W CFFLAG.W, D4 ; AND CONFIG RECALL ERROR OR.W FPFLAG.W, D4 ; AND FPGA ERROR THING
MOVE.W D4, FLAGS.W ; STASH SYSTEM ERROR FLAGS MOVE.W D4, RED.W ; AND USE AS RED BLINK PATTERN!
; CHECK FOR SERIAL COMMANDS IN THE RECEIVE BUFFER
SCAR: TST.W RXDONE.W ; CHECK FOR FLAG BEQ.S BASS ; NO CR, DO FAST LOOP
; IF THE FLAG SAYS "DONE", WE HAVE A COMMAND IN THE SERIAL INPUT BUFFER.
MOVEA.W # RXBUF, A6 ; AIM AT COMMAND TEXT IN BUFFER BSET.B # 0, CSPDR.W ; RAISE TP10 ============= JSR XCOM.W ; AND PARSE:EXECUTE COMMAND LINE BCLR.B # 0, CSPDR.W ; DUMP TP10 =============
MOVE.L # RXX, RXDONE.W ; SNEAKY: ZAP DONE FLAG ; AND LOAD BUFFER POINTER, MOST ATOMIC.
BRA.S MAIN ; IT'S PRUDENT TO DO THE CLEANUPS NOW.
.SBTTL .
The .TITLE and .SBTTL directives build entries in the table of contents, which appears first in the assembly listing. The listing itself is nicely formatted and paged. All this takes *less total time* than the typical C hack.
See the difference?
John
The PowerBasic compilers are awesome, espacially the 32-bit PBCC version. Run useful FOR loops at tens of MHz.
John
OK, "horribly" was a little overstated -- sorry about that that.
The Asus Eee Box Nettop
---Joel
Yes, although unfortunately they get some people into a lot of trouble as well. (I always worry with anyone who tells me they "never quite understood" pointers... as someone who started out writing assembly code eons ago, they always seemed perfectly straightfoward...) Using, e.g., C++ references accomplishes 95+% of what pointers get you with far less danger to the not-so-very-highly-skilled programmer.
On a sunny day (Wed, 20 Aug 2008 09:38:38 -0700) it happened John Larkin wrote in :
writing
They used C++, we all know Stroussup did not know how to program ;-)
Well,, the whole world is not embedded, and gracful exits _do_ exists in embedded systems, it should at least let the arbitration logic know it failed..., or tell the DVD player user to get a new version for the flash, perhaps swicth power, do some housekeeping, must be, witch to a backup, etc.
lines);
Well, you seem to want some language war here, as you cannot write C, obviously your judgement is well, let's say.. incomplete, or not qualified.
Maybe you should download one of the many programs I released, it is all very methodical, and all info is there. Largely the code is self-documenting, something you can do in C, but need a whole lot of cryptic comments for in ASM.
Bull, I maintain programs that are more then 10 years old, that carry _hardly_ any comments, as C is so self explaning (if done right). The whole problem is that you do not write in C, so you cannot read the source, it seems Greek to you. So learn it first.
BLOCK TPU
No idea, present us with your C hack, so we can compare.
Yes, C is much easier to read, easier to port, easier to compile, more universal (68??? CPU?) I still have an 68008 in the box. Never used. Been there for, lemme see, 20 years?
You keep bashing C, well, you maye be in big trouble when they stop making your processors... You will be unable to write anything big, mmm let's see, how about a video processor, in asm.
I will bury the language war axe here, I did refer you to Kernigan and Ritchie, all I can do,. Those who do not want to learn will stay as they are.
In the meantime, look at this (as to subject related)
Guy Macon wrote in news: snipped-for-privacy@giganews.com:
Hmm, I'd like to know how much power my system pulls - do you use a software widget, or some sort of adapater, to see your machine's actual power useage?
TIA!
- Kris
I don't know about Guy, but these:
---Joel
Devices with US-style power plugs can use a "Kill A Watt"
"Joel Koltner" wrote in news:QPYqk.45440$ snipped-for-privacy@en-nntp-06.dc.easynews.com:
That looks like the ticket! :)
I think the basic item will suffice, but now I also know that there are ones with more capabilities, should I decide I'd like that.
Just out of curiosity: Is the product itself is pretty much a normal everyday meter, with a 3-prong plug attached? (Well, plus a casing, of course.) Clever idea in any event ;)
Thanks!
- Kris
writing
embedded
text, lines);
I've done a little C. It's choice, not inability, that makes me dislike it.
Face it, most software these days is buggy and bloated. The last three major pieces of test equipmant we bought have numerous firmware bugs, and the vendor's software discipline is clearly chaotic. Keithley. Flir. Aeroflex. That's the culture.
No language is self-documenting. Code tells what is done; comments tell why it was done. C programmers hate to comment as part of their mentality and culture. The comments are more important than the code.
And my comments are not cryptic.
I've coded a little in C, and read a lot more. Most C programs are undisciplined, which may be OK for some apps, but not for mine.
No thanks. What I'm doing works far too well.
Hardly an embedded system.
John
Well, ASM can be as cryptic to one who has not memorized the instruction set.
Come on, John, admit it - you like it because you can use CAPS LOCK. ;-)
Cheers! Rich
Yep, that's it.
Years ago in college I built a simple box with a 200V AC voltmeter and 15A AC ammeter (the nice old analog Simpson meters), with the intent of measuring power consumption of various devices I used... but I didn't notice until after I'd built it that the ammeter had anything under an amp or two compressed into a tiny amount of space so it was basically useless for anything but large appliances.
---Joel
On a sunny day (Wed, 20 Aug 2008 11:24:17 -0700) it happened John Larkin wrote in :
We were discussing personal computers with multi core processors. Versus other solutions. Their solution, a simple plug in in the socket of an existing mother board, can give some database software up to 100 x speed increase.
You stated that all other's software is crap these days, added some test instruments as example... I dunno, and I cannot speak for things I have not tried, but *Linux*, and many, if not most, apps running on it, including my own, work without crashes, do what they are supposed to do, and are written in C. Many people contribute / work on the code, nobody seems to have the incredible problems you suggest one should have understanding that code...
When I got an email from a researcher saying: 'You forgot to increment 2 pointers in your soft', I felt a bit silly (I did rewrite it, and forgot that, but it still worked 100% so tests did not show it). But the fact that somebody else, to whom it is _new_ code, can just read it. and find an error, sort of destroys your argument, as that code was hardly commented, just self documenting.
For me, embedded, not embedded, it makes little difference with Linux. A Linksys router is also an embedded system, runs Linux, and let's see: grml: # telnet wap Trying 10.0.0.152... Connected to wap. Escape character is '^]'.
BusyBox v0.60.0 (2007.05.29-12:11+0000) Built-in shell (msh) Enter 'help' for a list of built-in commands.
# uptime 18:40:19 up 43 days, 1:28, load average: 0.05, 0.01, 0.00
43 days is not bad for a box that is accessible by the whole world, runs a http server from a SD card, a WiFi access point, with code added and modified by me. And it is only 43 days because I pulled the plug on it 43 days ago, not because it crashed. Strange, I could just read that C source, and adapt it. MIPS processor, source cross compiled on a x86 Linux box. Now if it had been ASM then you'd have to port, or rewrite, a gigabyte or so of source.C is cool :-)
Amazon's home of Seattle is almost local to me? :-)
The local Harbor Freight has definitely received plenty of my money too, though. (Of which the vast bulk went for Chinese-made tools, but oh well...)
---Joel
"Joel Koltner" wrote in news:GAZqk.32341$ snipped-for-privacy@en-nntp-01.dc.easynews.com:
Well, I think that's some nicely creative thinking ;) . As you may know, I'm now (rather a long time post-University ) to go back to the electroncis chapters from physics, which I studied as part fo the Bacteriology curriculum, and actually *learn* at least the basics of how it works (since I do have a little project I'd like to build), by getting and studyuing newer resources. THe point is that I'm now primarily a 3D/graphics/crafts (glass) person, and we often hear about how creative "artsy" people are, but I personally find it fascinating to see all the forms of creative thinking that go into technical/scientific fields.
I interests me to see things that are actually fairly simple, but arrived at by thinking creatively (or, in terms of the current and already-hackneyed phrase, "thinking outside the box").
OK, I know that isn't 'contributing a circuit' or offering 'hard tech info', or something that takes 'eelctronics skills' to say - it's merely a change in my own perspective , offered FWLIW ;)
- Kris
Rich Webb wrote in news: snipped-for-privacy@4ax.com:
OK, thank you! That offers a lot more info than tha Amazon link (tho' I'll prob. buy it through amazon ;) ).
- Kris
Agree 100% on that one.
From [
| |So just how fast is PB/CC anyway? We thought you'd never ask! |This tiny example may give you some idea of the power of 32-bit PB/CC. | | x## = 1 | y## = 1.000001 | t! = Timer | For i& = 1 To 100000000 | x## = x## * y## | Next | t! = Timer - t! | |What do we have here? 100,000,000 iterations of a simple floating |point operation. On an AMD 64 CPU, PowerBASIC 3.5 for DOS runs |this loop in 1.977 seconds. Pretty respectable, we think. PB3 has |been benchmarked favorably against every sort of compiler... C++, |Pascal, QuickBasic, you name it. It's always competitive. | |So what about the 32-bit PowerBASIC? Same computer. Same operating |system (WinXP Pro). Same source code, line for line. No attempt |to minimize any background tasks. Elapsed time: 0.209 seconds. |May we repeat that? Elapsed time: 0.209 seconds. That's an instant |gain of around 945%! Win32 versions of PowerBASIC are more than |nine times faster than the best DOS Basic around! |
I use a voltech power analyser, but it cost me more than my car did. You would be happier with a $25 Kill-A-Watt Electric Usage Monitor.
Have something to add? Share your thoughts — no account required.
Ask the community — no account required