News for hackers. Stuff that matters.
Re:Easy 6502 – How to get started writing 6502 assembly lang... by dwc on Thursday January 05, 2017 @10:37AM (#13327929)
> Assembly language is the lowest level of abstraction in computers - the point at which the code is still readable.

For simple enough instruction sets it was not unheard of that people memorized the actual opcodes. In school, at the transition from terminals to micros, a friend of mine walked up to one of the new Commodore 6502 machines and entered a simple program in hex directly into the monitor program. For a while I had the common opcodes for the RCA 1802 memorized, due to working with a project board without an assembler (writing assembly on paper, then hand assembling into opcodes, then keying in the opcodes).

There's no returning to those days and I wouldn't if I could, but I can't help but think that I was lucky to have experienced that for the knowledge and perspective.

Re:Easy 6502 – How to get started writing 6502 assembly lang... by vram22 on Thursday January 05, 2017 @04:35PM (#13331638)
> In school, at the transition from terminals to micros, a friend of mine walked up to one of the new Commodore 6502 machines and entered a simple program in hex directly into the monitor program. For a while I had the common opcodes for the RCA 1802 memorized, due to working with a project board without an assembler (writing assembly on paper, then hand assembling into opcodes, then keying in the opcodes).

Ha ha, nice. Early on in my learning programming, I got a book about the Commodore 64. Written by a 16 year old (!) kid from the UK (IIRC), it had, in Commodore BASIC, the complete listing (using POKE statements :) of an assembler program for the C64. I typed the program into a C64 I had access to, over some days (making mistakes with the hex codes in the middle of the listing, a couple of times, and having to start the whole thing over), and finally ended up with a working assembler. Then wrote some 6502 assembly language C64 programs using the assembler, including for simple graphics.

>There's no returning to those days and I wouldn't if I could, but I can't help but think that I was lucky to have experienced that for the knowledge and perspective.

Agreed - and a lot more along the same lines, later on DOS and Unix too :)

Re:Easy 6502 – How to get started writing 6502 assembly lang... by vram22 on Friday January 06, 2017 @12:14PM (#13338052)
Interesting, just saw here:

https://en.wikipedia.org/wiki/MOS_Technology_6502

under section 1.5, "Computers and games", it says that:

The 6510, a direct successor of the 6502 with a digital I/O port and a tri-state address bus, was the CPU utilized in the best-selling[48][49] Commodore 64 home computer.

https://en.wikipedia.org/wiki/MOS_Technology_6510

Re:Easy 6502 – How to get started writing 6502 assembly lang... by flohofwoe on Thursday January 05, 2017 @11:03AM (#13328172)
We used to test each other about Z80 opcodes staggering home drunk from the pub late at night as teenagers...

LDIR? ED B0! LD HL,nnnn? 21! ...

Ah... those were the times ;)

Re:Easy 6502 – How to get started writing 6502 assembly lang... by sporkenfang on Thursday January 05, 2017 @11:05AM (#13328193)
You can still do that with MIPS and some of the other assemblers only used with embedded chips!

A lot of people in my computer organization class five years ago ended up memorizing most of them, since it was sort of a side effect of having to go from opcodes to assembler and back again on quizzes.

Re:Easy 6502 – How to get started writing 6502 assembly lang... by ajross on Thursday January 05, 2017 @12:47PM (#13329407)
Woz famously hand-assembled the Apple ][ ROM, in fact.
Re:Easy 6502 – How to get started writing 6502 assembly lang... by mrkgnao on Thursday January 05, 2017 @01:58PM (#13330204)
Why do people write ][ for the Apple II? I've seen it in a bunch of places now.
Re:Easy 6502 – How to get started writing 6502 assembly lang... by rpeden on Thursday January 05, 2017 @02:05PM (#13330288)
Probably because that's exactly how it was written on the machine's original logo[1]. I think it changed later on, though.

[1] http://www.vintage-computer.com/images/apple2logo.jpg

Re:Easy 6502 – How to get started writing 6502 assembly lang... by dwc on Thursday January 05, 2017 @02:09PM (#13330331)
It was also ][ on-screen.
Re:Easy 6502 – How to get started writing 6502 assembly lang... by ajross on Thursday January 05, 2017 @04:41PM (#13331688)
Exactly that. It's how the machine announced itself at boot. You can see that right here:

https://www.scullinsteel.com/apple2/

Re:Easy 6502 – How to get started writing 6502 assembly lang... by rpeden on Thursday January 05, 2017 @02:13PM (#13330372)
Nice, thanks for adding that.

My first programming experience happened on an Apple ][ we had in my kindergarten classroom. It's been a long time since I've used one, though, so I didn't remember the on-screen logo.

Re:Easy 6502 – How to get started writing 6502 assembly lang... by Graham24 on Thursday January 05, 2017 @10:51AM (#13328060)
A9008502
Re:Easy 6502 – How to get started writing 6502 assembly lang... by wolfgke on Thursday January 05, 2017 @12:29PM (#13329204)
If it is 6502 code, it is in assembly language:

  A9 00      LDA #$00
  85 02      STA $02
But what is the intention of the code?
Re:Easy 6502 – How to get started writing 6502 assembly lang... by mrkgnao on Thursday January 05, 2017 @01:59PM (#13330214)
Looks more like an OEIS sequence identifier to me.
Re:Easy 6502 – How to get started writing 6502 assembly lang... by wolfgke on Thursday January 05, 2017 @04:27PM (#13331559)
There is no OESIS sequence with this number, since by

> http://oeis.org/eishelp2.html

"The A-number (for example A000108) is the absolute catalogue number of the sequence. It consists of A followed by 6 [not 7!] digits."

Indeed:

> https://oeis.org/A9008502

"Sorry, the page you requested was not found"