Bill Sux

Aug 16, 2005 206 Replies

.SBTTL . XPOKE : PROGRAM AN FPGA

; THIS IS ACTUALLY THE CODE PROTOTYPE; THE ACTUAL ROUTINE IS ; CACHED AND EXECUTED AT 'ZPOKE' IN CPU RAM. FPGA CONFIG DATA ; IS PACKED COURTESY OF BRICK.EXE.

; CALL THIS WITH A0 POINTING TO CONFIG DATA ; D6 HOLDING CONFIG WORD COUNT, LONG

; OICDSMMM ; SDO SDI SCLK DS SYSR- MUX MUX MUX

XPOKE: MOVE.B # 00000000b, D1 ; D1 : CLK 0, DATA 0 DESELECT MOVE.B # 00100000b, D2 ; D2 : CLK 1, DATA 0 DACS, MOVE.B # 10000000b, D3 ; D3 : CLK 0, DATA 1 MEZ, AND MOVE.B # 10100000b, D4 ; D4 : CLK 1, DATA 1 EEPROM

MOVEA.W # PORTE, A2 ; AIM AT THE FPGA I/O PORT MOVEA.W # SWSR, A5 ; AND MAKE POINTER TO THE WATCHDOG

MOVE.W # 5000, D7 ; WAIT ~~5 MS FOR XILINX TO ZAP XZAP: SUBQ.W # 1, D7 ; ALL ITS INTERNAL GOODIES BNE.S XZAP

XWORD: MOVE.W (A0)+, D0 ; GET A CONFIG WORD MOVE.W # 16-1, D5 ; LET'S DO 16 BITS PER PASS

XBIT: ASL.W # 1, D0 ; TEST A BIT: BCC.S XLO ; SKIP FOR DATA LOW

XHI: MOVE.B D3, (A2) ; CLOCK LOW, DATA HIGH MOVE.B D4, (A2) ; CLOCK HIGH, DATA HIGH DBF D5, XBIT ; FINISH THE WORD BRA.S XTAL

XLO: MOVE.B D1, (A2) ; CLOCK LOW, DATA LOW MOVE.B D2, (A2) ; CLOCK HIGH, DATA LOW DBF D5, XBIT ; FINISH THE WORD

XTAL: MOVE.B # 055h, (A5) ; SERVICE THE WATCHDOG MOVE.B # 0AAh, (A5) ; TIMER. ARF.

SUBQ.L # 1, D6 ; COUNT OFF ONE WORD BNE.S XWORD ; AND CARRY ON.

RTS

Yup.

John

No s*it! Hmm, I first read that as all UPPER CASH. UPPER CA$H.

Thanks, - Win

Of course not, real men use FORTRAN.

All right. This is the drill:

1) take preinstalled WinXP convert partition from NTFS to FAT32 (PartitionMagic or such) 2) turn OFF filesystem protection, auto-backup crap &c (go into services and disable the services) 3) rename the folders containing install copies of the IS crap (e.g., \\I386) 4) rename or delete %Windir%\\SYSTEM32\\DLLCACHE folder 5) start deleting MicroCrap (tm) -- when you get the annoying message to insert the WinXP CD, tell it you DON'T WANT TO RESTORE the crap 6) periodically test that nothing you want to keep is disabled, restore that from CD if necessary 7) iterate 5 & 6 as necessary 8) turn OFF windows installer and NUKE it, similarly for VBA, VBscripting, WSCRIPT and CSCRIPT and Javascript turn off the scheduler and try turning off all the "services" you can (lots of them are needed for anything you WANT to do anyway) -- you may have to manually adjust various "shortcuts"

It can take several months, and a bunch of fussing, but when you are done you will have a computer that has several GB more free on main partition, is bullet-proof against all

*common* Win32 viruses (because they depend on services and "features" that you've removed), and is rock-stable and won't go flaky on you. Anti-virus scanners can be set to run on demand rather than continuously in the background, safely. And programs will start up faster -- lots faster -- except for some of the M$ proggies perhaps.

IF you are forced to deal with WinXX, that's your ticket.

That's what I did (disclaimer, I was a hacker pre-1970 (back when "hacker" hadn't been corrupted into a synonym for "clueless script-kiddie system cracker") YMMV, some intelligence required) I also created a few FAT16 partitions and installed several versions of DOS, because WinNT/2000/XP is *HOPELESS* at dealing intelligently with floppies -- it can't even *read* old single sided 5.25" disks and it can't format floppies worth a d*mn. I also created a secondary FAT32 partition and put Win98 on that, which is useful during the customizing XP phase, you can boot to 98 and see and delete things XP doesn't want you to touch much more easily. But these are minor flourishes.

Your alternative is to get a real OS that billg and crew haven't mucked with.

them are needed for "turn off the scheduler and try turning off all the "services" you can (lots of them AREN'T needed for"

FORTRAN is for wimps. Real men code in ASM.

-- kensmith@rahul.net forging knowledge

Right. C needs so much more of it. It's a write-only language.

John

That's my choice (with VHDL for hardware markup and simulation), but we're in a minority. If you're not a 'C' bigot, try finding a HR-bot that won't filter the resume. I don't understand the demand for HLLs when all that's needed is bit-banging (what engineers typically do).

Keith

Only if "Software maintence" == "hire any idiot off the street and plug him into the job to clean up the last guy's mess"

Keith

I'm impressed. Too bad you'e in SF.

SRAM is easy, though it's still impressive. I've had a hard lock trying to get FPGAs configured. They can be quite pickey.

What, no C++ for moving bits? All you have to do is creat an object...

Keith

[...]

If you want a "high level" language, you really don't want "C" anyway. APL is a high level language as is Octave or IDL.

For most things Pascal is better than "C" by a long shot.

-- kensmith@rahul.net forging knowledge

The reason is very simple.

It's called software maintenace.

Graham

K&R designed C to run on a 16-bit PDP-11. One of their design goals was minimal use of keywords and maximum use of punctuation sequences, which minimizes compiler parser tables and maximizes obscurity.

Precursor languages were "A" and "B". Too bad they quit so soon. They could have progressed to a language that had no keywords and was entirely punctuation. They could have called it "F".

John

who programs in assembly and PowerBasic.

would have been P,

familiar?)

people try to

Simple C compilers without the C++ crap that are written for small microcontrollers are pretty close to assembly shorthand. A word of advice: avoid pointers if possible.

Yep! I *hate* 'C'. I tell everyone around that I can't spell it.

"F" for microprocessors anyone?

Assembly and VHDL.

Keith

I use the analogy of a Ferrari, without seats, seatbelts, body etc. Very powerful, but by god you have to be careful, or it goes horribly wrong.

most of the code I have written in C has involved me struggling to do things that are trivial in assembler. Although to be fair, all of the C compilers I have used have been utter s*it.

I have had to deal with the results of numerous C programmers who achieved negative work. One guy in particular had *every* piece of code he wrote over a 2-year period thrown out & re-written by someone with a semblence of understanding. He is now a lab demonstrator at a hokey little university.

Like engineers, programmers are born, not taught. Far too many are little more than glorified typists.

Cheers Terry

Precursor was B, on the way to a full implementation of BCPL. After C would have been P, then L presumably, but the goal changed along the way. (Does THAT sound familiar?)

And C is, in fact, a pretty good HLA for the PDP-11. Too bad too many people try to use it for things it is totally unsuited for ....

I read in sci.electronics.design that John Larkin wrote (in ) about 'Larkins website sucks[was Re: Bill Sux]', on Fri, 2 Sep 2005:

I think '.' might be a better name.

Regards, John Woodgate, OOO - Own Opinions Only. If everything has been designed, a god designed evolution by natural selection. http://www.jmwa.demon.co.uk Also see http://www.isce.org.uk

I read in sci.electronics.design that John Larkin wrote (in ) about 'Larkins website sucks[was Re: Bill Sux]', on Fri, 2 Sep 2005:

Ah, yes. I remember that. A write-only language that actually works. Of course, if you write it in hex, it is no longer write-only: 20 09 09 09

12....
Regards, John Woodgate, OOO - Own Opinions Only. If everything has been designed, a god designed evolution by natural selection. http://www.jmwa.demon.co.uk Also see http://www.isce.org.uk

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required