Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Hacking the NES With Lisp

Unknown Lamer posted more than 2 years ago | from the covert-alien-technology dept.

Programming 80

Andy Hefner has a detailed blog post covering his quest to program an NES with the assistance of Common Lisp. He developed a new 6502 assembler, a mini-language for composing musical sequences, and a neat demo (rom image).

cancel ×

80 comments

Sorry! There are no comments related to the filter you selected.

(first post) (-1)

Anonymous Coward | more than 2 years ago | (#38948799)

(frosty piss)

a strange mix of nausea and admiration (5, Funny)

decora (1710862) | more than 2 years ago | (#38948847)

on the one hand, this guy has re-implemented assembler with lisp syntax.

on the other hand, this guy has re-implemented assembler with lisp syntax.

Re:a strange mix of nausea and admiration (4, Informative)

Dwedit (232252) | more than 2 years ago | (#38948863)

Yeah, when you're writing Assembly, it's still assembly. Using lisp to make macros doesn't change the langauge.

Re:a strange mix of nausea and admiration (5, Interesting)

ratboy666 (104074) | more than 2 years ago | (#38949851)

Read the fine article. Using CL does substantially change the language. Specifically, note the higher order manipulation of the eventual low-level program that the author achieved using promises (delayed evaluations). Basically, "threading while assembling".

Also, notice the ease of introducing higher-level flow control constructs (IF and UNTIL) into assembler. And the elimination of a second assembler pass by use of promises for forward references. It's kind of "magic" -- the correct data will be there when it's needed!

In this use-case, CL is a notational system for NES programming. It probably shouldn't be called "assembler" anymore, as the power of CL can be brought to bear in the process of generating the desired machine code.

Re:a strange mix of nausea and admiration (3, Interesting)

Hentes (2461350) | more than 2 years ago | (#38948919)

Well he wasn't the first one to do it, Common Lisp already has a disassemble [psg.com] command.

Re:a strange mix of nausea and admiration (4, Funny)

MightyMartian (840721) | more than 2 years ago | (#38948927)

Great. Now I can run Super Mario Bros. in Emacs!

Re:a strange mix of nausea and admiration (5, Funny)

Anonymous Coward | more than 2 years ago | (#38949009)

This reminds me of the old quote "Emacs is a wonderful operating system. All it's missing is a decent text editor."

Re:a strange mix of nausea and admiration (0, Redundant)

drfreak (303147) | more than 2 years ago | (#38949213)

Normally I wouldn't reply to an AC, but being a vi fan I have to give props. Although, you know, all the best operating systems aren't emacs, they are created *in* emacs.

Re:a strange mix of nausea and admiration (1)

Darinbob (1142669) | more than 2 years ago | (#38949791)

Have a look at the original Emacs that was a set of macros written in TECO. That's scary stuff.

Re:a strange mix of nausea and admiration (-1)

Anonymous Coward | more than 2 years ago | (#38950319)

Normally I wouldn't reply to an AC

Get over yourself, faggot.

Re:a strange mix of nausea and admiration (1)

lister king of smeg (2481612) | more than 2 years ago | (#38950057)

No Emacs OS can emulate vi thus it does have a desent text editor

Re:a strange mix of nausea and admiration (0)

Anonymous Coward | more than 2 years ago | (#38959023)

How's the spellchecker in vi?

Re:a strange mix of nausea and admiration (1)

Randle_Revar (229304) | more than 2 years ago | (#38962129)

Doesn't have one. Vim has a good one, however (Emacs can also imitate Vim)

Re:a strange mix of nausea and admiration (5, Funny)

Anonymous Coward | more than 2 years ago | (#38949143)

on the one hand, this guy has re-implemented assembler with lisp syntax.

on the other hand, this guy has re-implemented assembler with lisp syntax.

and on the gripping hand, it's the world's first assembler that requires you to start lines with seven parentheses and rewrites itself at runtime.

Re:a strange mix of nausea and admiration (1)

hoggoth (414195) | more than 2 years ago | (#38949307)

Heh +1 Motie!

Re:a strange mix of nausea and admiration (0)

Anonymous Coward | more than 2 years ago | (#38949361)

6502? Just like my old Commodore VIC-20? Common Lisp (When I took Artificial Intelligence in University I pronounced it Lithp)? Lisp is an old beast of a language that kicks the stuffing out of Fortran (and is about as old), and is still a viable A.I. language (used in game logic, simulations, etc.). I'm half impressed, half nauseous.

Re:a strange mix of nausea and admiration (1)

obsess5 (719497) | more than 2 years ago | (#38954855)

Fortran is just as old as Lisp and still a viable programming language. It is widely used in scientific computing and high-performance computing. I like both languages; good on both of them. Neither language is as simple now as they were in the early days.

Re:a strange mix of nausea and admiration (4, Informative)

Darinbob (1142669) | more than 2 years ago | (#38949777)

The earliest lisps had assembler. It was sort of normal in a way because assembler was your language of choice for this sort of thing. C didn't exist yet, Fortran was just wrong, the other procedural languages were bulky, etc. Machines were low on memory and you often wanted to machine specific actions, you were writing your own runtime library as you went. So even as far back as Lisp 1.5 documentation discusses how to use assembler.

The earliest lisps had compilers as well which went well with assembler written functions. Your programming environment was often a stack of cards that were loaded into a machine, or a tape that was read. So stopping to edit/compile/link/load was often impractical compared to just dumping some assembler while still in the interpreter (though of course if you crashed the machine you had to hide until pitchfork wielding mob stopped looking for you).

The thing people remember most about Lisp other than parentheses are CAR and CDR functions. These are named for specific fields in a PDP 36-bit word which were accessible via machine instructions.

Actually I remember one other think about lisp (1)

NotSoHeavyD3 (1400425) | more than 2 years ago | (#38949983)

That it had the key word defun. I guess I've got to complement them on their honesty that one of the goals of the creators of lisp was to remove the fun from programming.(Because it certainly did for me.)

Re:Actually I remember one other think about lisp (1)

rmstar (114746) | more than 2 years ago | (#38954027)

I guess I've got to complement them on their honesty that one of the goals of the creators of lisp was to remove the fun from programming.(Because it certainly did for me.)

Why is that? Must have been a bad teacher, because Lisp is really fun to program in. You need the help of an editor for the parentheses, but other than that its very easy and very powerful.

Re:Actually I remember one other think about lisp (1)

NotSoHeavyD3 (1400425) | more than 2 years ago | (#38960923)

Oh this was back in the early 90's and we were using Emacs. Never heard anyone mention some sort of add on that would have helped with the parens. (I completely hate lisp because of that course btw.)

Re:Actually I remember one other think about lisp (0)

Anonymous Coward | more than 2 years ago | (#38967243)

Oh this was back in the early 90's and we were using Emacs. Never heard anyone mention some sort of add on that would have helped with the parens. (I completely hate lisp because of that course btw.)

You should sue for a refund. Early 90's EMACS had plenty of support for coding in LISP (being coded in LISP and all that). You just had to choose the major mode you wanted to use--if you named the file correctly it "just happened."

Re:a strange mix of nausea and admiration (1)

pz (113803) | more than 2 years ago | (#38955127)

The thing people remember most about Lisp other than parentheses are CAR and CDR functions. These are named for specific fields in a PDP 36-bit word which were accessible via machine instructions.

Contents of Address Register
Contents of Data Register

Re:a strange mix of nausea and admiration (2)

Darinbob (1142669) | more than 2 years ago | (#38957997)

Close but not exact. I got it wrong too, it wasn't a PDP but an IBM.

These both were fields from the same register ( bit words and the computer allowed either 15 or 16 bit word addresses). So according to Wikipedia the definitions were:
"Contents of the Address part of Register number"
"Contents of the Data part of Register number"
And a couple other tiny fields that initially were in Lisp but were later dropped.

Yea, it's kind of weird. The PDPs used at MIT later were 36 bit and also allowed sticking two word addresses into a single word (byte addresses required a full word). So it was very handy for doing CAR/CDR in a single word there.

Re:a strange mix of nausea and admiration (1)

Darinbob (1142669) | more than 2 years ago | (#38958007)

Whoops messed up again. It's "Contents of Decrement part of Register number"...

That's hot (3, Interesting)

Anonymous Coward | more than 2 years ago | (#38948861)

I think that is the coolest thing I have seen in a while. Nothing like the king of all high level languages generating low level machine code.

Re:That's hot (-1)

Anonymous Coward | more than 2 years ago | (#38948889)

Sometimes I have uncontrollable bowel movements.

Re:That's hot (1)

MightyMartian (840721) | more than 2 years ago | (#38948933)

And somehow one of them ended up on /.

Re:That's hot (0)

Anonymous Coward | more than 2 years ago | (#38949375)

And made the front page as a hacking article, too!

Re:That's hot (0)

Anonymous Coward | more than 2 years ago | (#38953365)

Odd coincidence: I wrote a 6502 assembler in Haskell just before Christmas. And Haskell is the king of all high level languages.

Re:That's hot (1)

TemporalBeing (803363) | more than 2 years ago | (#38955519)

I think that is the coolest thing I have seen in a while. Nothing like the king of all high level languages generating low level machine code.

They didn't write it in SmallTalk which would certainly be the king of all high level languages, not lisp.

Lisps only quality is its known use of braces - which is also its greatest fault. A queen among queens.

Nostalgia is a powerful force... (-1)

Anonymous Coward | more than 2 years ago | (#38948903)

There aren't many NES consoles left alive, and I can't conceive of any person that will actually benefit from this. But, all the power to him. I guess.

Re:Nostalgia is a powerful force... (2, Insightful)

ObsessiveMathsFreak (773371) | more than 2 years ago | (#38948961)

Are you kidding?! There are probably more working NES consoles out there than N64 or Nokia N-gages.

Re:Nostalgia is a powerful force... (2)

CohibaVancouver (864662) | more than 2 years ago | (#38949041)

Exactly right. I can think of 10 different closets right now that have NESes inside.

Re:Nostalgia is a powerful force... (5, Funny)

Anonymous Coward | more than 2 years ago | (#38949165)

Those NES boxes are quite comfortable with their sexuality, thank you very much, and just value their privacy. If they want to stay in the closet, who are we to disagree?

Re:Nostalgia is a powerful force... (-1)

hairyfeet (841228) | more than 2 years ago | (#38949205)

But is there a point? Well I'm sure the guy got a few weekends of goofing off to show for it is there any point of this being on slashdot? i mean i can see if it were an article on hacking the PS3 or X360, as those units have enough horsepower that if you could get around the DRM they would probably make really nice HTPCs and of course you can cluster the PS3. But we are talking the NES which while it was fun back in the day most folks that DO have one have it stuffed in a closet somewhere where it will most likely never see the light of day, like the closet I have out at my mom's that has a Genesis, SegaCD, N64, GameCube, and an Xbox in it. Not really a point in breaking out any of those systems anymore. I mean sure you can turn the Xbox into an SD player if you want to take the time but why bother when you can get an Nbox HD for like $60?

This is why I've always preferred computers to consoles because the DRMtastic nature of the consoles quickly make them worthless. once they are no longer sold games disappear quickly, cords get lost, other than a trip down memory lane they can't really do much. Meanwhile the PC I built in 1995 is still running 5 days a week as a C&C lathe controller, the gamer rig I had in 2000 has had a late model P4 slapped in it and is being used by suzy the checkout girl to surf the web, my Celeron from 05 is being used by mom for AoE and her match 3 games...you get the idea. There is just not much you can actually DO with these things except play approved games in the approved method.

While i'm glad this guy had fun i just don't see a point of putting an article about somebody who made a 25 year old console go "bloop" when frankly there are other topics that could have used the space.

Re:Nostalgia is a powerful force... (4, Funny)

Pseudonym Authority (1591027) | more than 2 years ago | (#38949271)

I truly extend my condolences that your pet project didn't get featured on Slashdot and that it has made you bitter and jealous of the work of others.

Re:Nostalgia is a powerful force... (2)

Osgeld (1900440) | more than 2 years ago | (#38949383)

wow there killer, way to think outside of the box, you installed software on your pc and let nintendo tell you what you could do! we need more people like you and less of these retards doing interesting things with obsolete machines.

Re:Nostalgia is a powerful force... (-1)

hairyfeet (841228) | more than 2 years ago | (#38950195)

What the fuck are you babbling about? Are you high? Making an NES sound chip go "bloop" isn't "sticking it to teh man" you know, nintendo frankly doesn't give a flying fuck what you do with a 25+ year old NES dumbass.

And that doesn't change the fact these machines are so pitifully underpowered that frankly for anything OTHER than making it go "bloop" its completely pointless. hell i throw in the trash machines 200 times more powerful than that every. single. day. simply because there really isn't a point in some old 1Ghz anything anymore.

but if you think spending a couple of weeks writing an assembler just so you can go "bloop" is such an accomplishment here is your special olympics badge, it says "Ur Special!", oh and have a cookie. you keep sticking it to teh man sparknut, i'm sure he really is fucking crying now. my fucking god, he can make our old abandoned shit go "bloop!" whatever shall we do?

Re:Nostalgia is a powerful force... (3, Insightful)

windcask (1795642) | more than 2 years ago | (#38952175)

Art is about creative self-expression. If someone feels that writing an assembler for a 25 year-old console and making it 'go bloop' expresses himself in ways that modern technology cannot, what's the harm in that? It's neat. He obviously isn't trying to get rich or serve any other practical purpose with this.

Re:Nostalgia is a powerful force... (0)

Anonymous Coward | more than 2 years ago | (#38953221)

Somebody better call a waaahbulance for this guy

Re:Nostalgia is a powerful force... (1)

Gordonjcp (186804) | more than 2 years ago | (#38953969)

So, what you're really saying is, "I'm unhappy with my life because I've never known what creativity feels like"?

Re:Nostalgia is a powerful force... (1)

Thud457 (234763) | more than 2 years ago | (#38954499)

nintendo frankly doesn't give a flying fuck what you do with a 25+ year old NES dumbass.

Since doing something creative, if not actually constructive, takes your time away from playing and buying the latest Nintendo games, I'm sure they're actually against such anti-consumerist ventures.

Re:Nostalgia is a powerful force... (0)

Anonymous Coward | more than 2 years ago | (#38963963)

The GREATEST arcade video games EVER CREATED ran on EXTREMELY limited hardware when creativity and ingenuity ruled the day.

For example, the PAC-MAN program Toru Iwatani et. al. created in 1979 for NAMCO was only 8 kilobytes and could fit on two sheets of paper. It was copied into 100,000 game cabinents, and made well over ONE BILLION DOLLARS worldwide!

The graphics where laughably crude compared to today's games but it was FUN TO PLAY.

When STREET FIGHTER II came out in 1991, it heraled the end of these colorful, fun games with crude graphics and replaced it with graphics, graphics, and MORE GRAPHICS!

Before home game consoles got powerful enough to make video arcades essentially obsolete, all you could find in an arcade were fighting games, driving games, and shooting games, along with the cheesy ticket redemption games.

This is why old school gamers got together and created arcade game emulaters such as MAME to relive the experience of playing these earlier games. The industry response was to crack down on the ROM sites that provided the games MAME needed to run (rightfully so on copyright grounds) then create GAMETAP which is essentially MAME across the internet.

At least the industry has thrown a bone or two to the old school gamers by re-releasing early hit games in their arcade form or making a game pack of them bundled into a dedicated controller that can be plugged into the RCA jacks of your TV set.

HTPCs don exits (1)

tepples (727027) | more than 2 years ago | (#38949447)

This is why I've always preferred computers to consoles because the DRMtastic nature of the consoles quickly make them worthless.

Except most people aren't willing to buy a PC and hook it up to a TV. The cases are too big, they don't come with a recliner-friendly remote, etc. For this reason (and greed [cracked.com] ), the Wii is still a lot more likely than the PC to get games capable of using multiple controllers.

Re:Nostalgia is a powerful force... (2)

EETech1 (1179269) | more than 2 years ago | (#38949613)

Does that C&C lathe play CNC Music Factory

Or is it a...
Command and conquer lathe controller?

I'm not vicious or malicious, just lovely and delicious. OSLT.

Cheers!

Re:Nostalgia is a powerful force... (0)

Anonymous Coward | more than 2 years ago | (#38948975)

He benefited -- he had fun doing it.
And I benefited -- had fun reading about it. (Even I have no real nostalgia for the NES -- I played some when I was a kid, but was on more powerful hardware when I started hacking.)

Re:Nostalgia is a powerful force... (0)

Anonymous Coward | more than 2 years ago | (#38949001)

So maybe the next project is recreating the hardware.

Obligatory (1)

Hsien-Ko (1090623) | more than 2 years ago | (#38948925)

But can it run Crysis?

Re:Obligatory (0)

Anonymous Coward | more than 2 years ago | (#38949313)

I'm pretty sure that it could, given that it has a general-purpose processor and memory. A virtual machine could be written and it run from a simulated environment. Not sure that it would look nice, given the 16 color limit, and the framerate would suck, but it might be fun.

Re:Obligatory (1)

tepples (727027) | more than 2 years ago | (#38949461)

a general-purpose processor and memory

All you "Turing complete" weenies seem to forget that a Turing machine has infinite memory, unlike the 4096 bytes of RAM in the NES. Sure, you can put hundreds of megabytes of RAM on a cartridge, but at that point you could put a smartphone chipset on a cartridge and have it fill a frame buffer as if it were the successor to Wide Boy/Super Game Boy.

Re:Obligatory (1)

Hsien-Ko (1090623) | more than 2 years ago | (#38949653)

What about an OnLive kind of thing? As in, streaming raw data prepared for it through a cable from another machine so we can get Crysis at glorious 256x240

Wide Boy or Super FX (1)

tepples (727027) | more than 2 years ago | (#38953871)

streaming raw data prepared for it through a cable from another machine

That would be Wide Boy, the pre-production version of Super Game Boy. Or it would be Super FX, a second CPU on a Super NES cartridge that renders graphics. In discussions about "super-mappers" on NESdev BBS, I've often mentioned a TV tuner for NES connected to an Xbox 360 as the hypothetical "upper limit" of what a mapper can do.

This is what Slashdot needs more of (5, Interesting)

comrade k (787383) | more than 2 years ago | (#38949179)

Bravo, Slashdot. This is the kind of stuff that the geek crowd finds interesting. Is it useful? Nope. Is it cool and borderline bizarre? Yep!

Re:This is what Slashdot needs more of (3, Interesting)

wierd_w (1375923) | more than 2 years ago | (#38949389)

What I have always wondered about, is just how far can you push one of these old systems?

Like the snes.. it was designed to accept a 3rd party cpu inside the cartridge, in addition to the game rom.

What would happen if you built what would essentially be rom code toolbox routines to access the snes's hardware, and then switch execution to a more powerful/more modern low energy cpu, like an arm?

You would use the snes as an input device (they did make a snes mouse.....), and as the graphics hardware, but run all the heavy lifting on the arm instead of the 6500 series cpu. Other than the rom routines to do the interface, everything else is handled by a shared ram bank and an sdcard slot put into the cartridge.

Why? So you can run linux on the snes. Why? Because you could.

I bet you could do some really clever stuff by simulating a framebuffer.

Super Game Boy (1)

tepples (727027) | more than 2 years ago | (#38949467)

What would happen if you built what would essentially be rom code toolbox routines to access the snes's hardware, and then switch execution to a more powerful/more modern low energy cpu, like an arm?

You'll have reimplemented Super Game Boy (for Super NES) or Game Boy Player (for Nintendo GameCube).

Re:Super Game Boy (1)

wierd_w (1375923) | more than 2 years ago | (#38949635)

Didn't the gb have a z80 though? That's a bit less powerful than the 6500series cpu in the snes.

Simply because the snes databus is 16bit doesn't mean the 3rd party cpu needs to be 16bit. The snes hardware could be treated like a 16bit peripheral, as far as the embedded SoC in the cart was concerned.

I still think something more interesting than the superGB could be made this way.

Re:Super Game Boy (1)

tepples (727027) | more than 2 years ago | (#38953783)

Didn't the gb have a z80 though?

It was an 8080-derivative made by Sharp with some but not all features of the Zilog Z80, nicknamed "GBZ80" by emulator authors. Some Z80 features, such as the separate bank of BCDEHL registers for interrupt handlers, were left out in favor of special fast addressing modes for $FF00-$FFFF to mimic the 6502's "direct page" at $0000-$00FF.

That's a bit less powerful than the 6500series cpu in the snes.

The old Commodore 64 vs. ZX Spectrum flamewars ended up with a consensus that the 6502 is roughly as fast as a Z80 clocked two to three times as fast, depending on workload. This makes the CPU of the Nintendo Entertainment System (1.8 Mhz 6502) comparable to that of the Game Boy (4.1 MHz GBZ80) or the Sega Master System and Game Gear (3.6 MHz Z80). The 65816 in the Super NES ls clocked faster (let's say 3 MHz, because it runs at 3.6 MHz but slows down to 2.7 MHz when accessing RAM or slow cartridge ROM and freezes for a few cycles every scanline to let DRAM refresh itself).

I still think something more interesting than the superGB could be made this way.

There's still a limit of 4 bits per pixel unless you use an 8-bit video mode, and I don't think there's enough B-Bus bandwidth to send full-screen 8-bit 60 fps across the cart edge. But smart dithering techniques might still be able to squeeze out of 4bpp, especially when combined with the ability to select one of eight 15-color palettes for each 8x8 pixel area square. But by then, the Nintendo 64 had come out, and the version of the "Wide Boy" (SGB-like device for licensed developers and the gaming press) for the GBC and GBA ran on the N64.

Re:Super Game Boy (0)

Anonymous Coward | more than 2 years ago | (#38949785)

What would happen if you built what would essentially be rom code toolbox routines to access the snes's hardware, and then switch execution to a more powerful/more modern low energy cpu, like an arm?

You'll have reimplemented Super Game Boy (for Super NES) or Game Boy Player (for Nintendo GameCube).

Or the Supercharger for the Atari 2600.

That's right, get off my lawn.

Re:This is what Slashdot needs more of (0)

Anonymous Coward | more than 2 years ago | (#38950163)

But is adding an external CPU really pushing the old system, or is it more like creating a new system that uses old display and sound hardware? I find it more impressive if you can push the old system, CPU and all, into doing new tricks.

it could be done... (0)

Anonymous Coward | more than 2 years ago | (#38951177)

If you`re curious about the idea of mixing new hardware with old, look into Amiga CPU boards. Folks have taken an Amiga that shipped with a 14Mhz 68020 (or in some cases even a 7MHz 68000) and added a 200+MHz PPC as basically a co-processor. Of course when you do this, the original hardware becomes a bit of a bottleneck, so next thing you know you`ve also added a separate video card, sound card, and SCSI controller.

But I think there have been at least a few demos that used an `060 or PPC CPU to render some fancy gfx and push it out the stock graphics hardware.

Re:This is what Slashdot needs more of (0)

Anonymous Coward | more than 2 years ago | (#38952179)

I believe this is exactly how the Super FX chips in Doom and StarFox for Super NES worked.

This is 8-bit NES though.

Re:This is what Slashdot needs more of (3, Interesting)

DigiShaman (671371) | more than 2 years ago | (#38949469)

Some of the best Z80 ROM music I've heard has to be M.U.S.H.A (Musha Aleste) on the Sega Genesis (Mega-Drive). Herzog Zwei comes in a close 2nd place. The composers were Gods, and they got paid to do what they loved to do. You've got to admire that kind of talent.

Re:This is what Slashdot needs more of (1)

Hidyman (225308) | more than 2 years ago | (#38949987)

Technoforce 2 had some sweet music as well.
Those bring back fond memories.

Re:This is what Slashdot needs more of (0)

Anonymous Coward | more than 2 years ago | (#38949765)

One of the better stories on slashdot in the recent days if you ask me

Re:This is what Slashdot needs more of (-1, Troll)

bonch (38532) | more than 2 years ago | (#38949905)

Bravo, Slashdot. This is the kind of stuff that the geek crowd finds interesting. Is it useful? Nope. Is it cool and borderline bizarre? Yep!

Slashdot used to post a lot more of this stuff before it became an advocacy site. I'm so sick of patent, copyright, and Pirate Bay articles I could cry blood.

By the way, noticed that the "News For Nerds. Stuff That Matters." tagline is gone?

thats b/c "this stuff" became illegal (4, Insightful)

decora (1710862) | more than 2 years ago | (#38951219)

if you tried to do what this guy is doing for NES with a Sony Playstation or IPhone you would sued and threatened with millions in legal bills. If you don't believe me, ask George Hotz.

slashdot didn't move away from geeky stuff... certain corporate interests decided to attack the entire principle of DIY at its core. you can't expect slashdot to be silent about that.

Re:thats b/c "this stuff" became illegal (1)

Yvan256 (722131) | more than 2 years ago | (#38959469)

There's still SparkFun.com and Adafruit.com, I guess.

What I thought reading the title... (0)

Anonymous Coward | more than 2 years ago | (#38949833)

thith ith awethome!

6502 assembler in Logo (2)

leighklotz (192300) | more than 2 years ago | (#38949855)

I wrote a 6502 assembler in Logo in 1981 and we shipped it with the utilities disk.

Re:6502 assembler in Logo (0)

Anonymous Coward | more than 2 years ago | (#38952577)

Nobody cares, this is way cooler.

Re:6502 assembler in Logo (0)

Anonymous Coward | more than 2 years ago | (#38953049)

That is an awesomely insane thing to do! I didn't even know such a thing was possible in Logo. The utilities disk for what, if you don't mind me asking? Is there anywhere one can see this code, it just sounds ... wow.

A better 6502 assembler (1)

MichaelSmith (789609) | more than 2 years ago | (#38950153)

Just what I needed 35 years ago.

Paul Graham will definitely... (2)

curious.corn (167387) | more than 2 years ago | (#38950243)

send him a crate of beer ;)

Looks like Henry G. Baker's COMFY 6502 compiler (3, Interesting)

dwheeler (321049) | more than 2 years ago | (#38950783)

Fun! This 6502-assembler-in-LISP looks similar to Henry G. Baker's "COMFY" 6502 compiler (described in "The COMFY 6502 compiler", SIGPLAN Notices, 1997 [pipeline.com] ). You can check out the COMFY-6502 implementation that uses Common Lisp [nfshost.com] (sadly this appears to be entrapped in the ACM non-commercial-use-only license [acm.org] , though for 6502 code that isn't very limiting). One cool thing about the approach of using LISP as an "assembler" in general is that unlike many traditional macro assemblers, this approach can easily do stuff like choose the optimal instruction set for branches because it can determine if it's in range for a short branch and use them when available. You can do it other ways, of course, but it's pretty elegant in LISP. Those interested in this sort of thing might like my page on 6502 Language Implementation Approaches [dwheeler.com] or my page on making LISP-based languages more readable (especially sweet-expressions) [dwheeler.com] .

This is real programming (1)

Viol8 (599362) | more than 2 years ago | (#38951519)

I hope all the HTML-5 "coders" are taking note.

Re:This is real programming (1)

Yvan256 (722131) | more than 2 years ago | (#38959501)

Coding != Programming.

HTML5 and CSS is coding.
PHP* and Javascript* is programming.

I don't care if you hate those, it's still programming. Now go cry in the corner.

And for a 6502 disassembler... (1)

ockegheim (808089) | more than 2 years ago | (#38952449)

Here is a interesting article [archaeology.org] about the design of the 6502, on archeology.org of all places.

But you already knew it was archeology.org, didn’t you?

Hacking with lithp? (0)

Anonymous Coward | more than 2 years ago | (#38955849)

Thounds thtoopid to me.

Anybody? (0)

Anonymous Coward | more than 2 years ago | (#38965547)

Did anybody else read the headline and automatically think "N. E. Eth.?" Or was it just me?

Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?