Jump to content
IGNORED

Official name for what asm uses? Acronyms? Abbreviations? Mnemonics?


Recommended Posts

In my VIC days I referred to them as the Machine Language Instruction Set as that's what the VIC 20 Programmers Reference Guide called them when back when I taught myself machine language to make faster programs on the VIC. A text version of the guide can be found here.

 

Nowadays I call them opcodes, like in this NMOS 6502 Opcodes reference list from www.6502.org.

Edited by SpiceWare
Link to comment
Share on other sites

In my VIC days I referred to them as the Machine Language Instruction Set as that's what the VIC 20 Programmers Reference Guide called them when back when I taught myself machine language to make faster programs on the VIC. A text version of the guide can be found here.

 

Nowadays I call them opcodes, like in this NMOS 6502 Opcodes reference list from www.6502.org.

 

But is the word opcode an acronym, abbreviation, or a mnemonic? :D |:)

Link to comment
Share on other sites

opcode is an abbreviation: In computer science, an opcode (operation code) is the portion of a machine language instruction that specifies the operation to be performed.

 

The Assembly section of that wiki article mentions mnemonics, and links to Opcode mnemonics.

 

It seems like, but isn't totally clear, that mnemonic is the proper term for the 3 letter combinations while opcode is the numeric value of the instruction that the CPU understands.

  • Like 1
Link to comment
Share on other sites

There shouldn't be any debate about this. The mnemonic is the human-readable form -- the "three letter" way of writing the instruction. It's compiled into binary, replaced by an opcode (the number) which effectively identifies the instruction for the CPU. The mnemonic "LDA" is opcode $A9, and "RTS" is opcode $60. And yes, I did remember many opcodes back in the day. Please remember -- call the human-readable ones mnemonics, because that's their proper name. Call the machine-readable numbers opcodes.

  • Like 3
Link to comment
Share on other sites

opcode is an abbreviation: In computer science, an opcode (operation code) is the portion of a machine language instruction that specifies the operation to be performed.

 

The Assembly section of that wiki article mentions mnemonics, and links to Opcode mnemonics.

 

It seems like, but isn't totally clear, that mnemonic is the proper term for the 3 letter combinations while opcode is the numeric value of the instruction that the CPU understands.

 

Spice,

to clear this up for RT :) or add to the confusion ;) consider that a mnemonic is an opcode mnemonic by definition in context, just as a an opcode is equally a mnemonic opcode; it just depends on which side of the table you approach since they are both symbols that stand directly for each other.

 

In practice if we plug in the opcodes directly we may be (at least until we memorise them) using a paper lookup table of the mnenomic opcodes, scanning through the mnemonics in the table to find the associated opcodes we need to use.

 

Conversely once memorised, the developer can look at the opcodes directly like Neo in the Matrix and do a reverse mental lookup to determine the opcode mnemonics. At some point the line blurs (millions and millions of lines of code later) and the opcode itself becomes a mnemonic device for the underlying operation and we then of course have a mnemonic context switch since the developer is associating the opcode directly with the target operation and we've tossed out the other mnemonic completely.

 

There's no confusion of course with the operands as the mnemonic operands and opcode operands are always one and the same.

 

We're just playing with semantics though; Andrew, Johnny and Tjoppen are right on :)

 

OK I got tounge tied doing that and had to edit it twice! :)

Edited by Mr SQL
Link to comment
Share on other sites

Remember there isn't a one-to-one correspondence between mneumonics and opcodes. E.g. The mneumonic LDA represents 8 different opcodes, dependent on addressing mode:

 

LDA (LoaD Accumulator)

 

Affects Flags: S Z
MODE		 SYNTAX	 HEX LEN TIM
Immediate	 LDA #$44	 $A9 2 2
Zero Page	 LDA $44	 $A5 2 3
Zero Page,X	 LDA $44,X	 $B5 2 4
Absolute	 LDA $4400	 $AD 3 4
Absolute,X  LDA $4400,X $BD 3 4+
Absolute,Y  LDA $4400,Y $B9 3 4+
Indirect,X  LDA ($44,X) $A1 2 6
Indirect,Y  LDA ($44),Y $B1 2 5+

 

(From www.6502.org/tutorials/6502opcodes.html)

 

And the 6502 is a fairly simple processor in this respect, the relation between mneumonics and opcodes can be far more complex on other processors.

Edited by eshu
Link to comment
Share on other sites

Thanks all for the clarification - I've run into terminology mismatches in the past where I'd figured out things on my own and didn't learn the official term until years later (Linked Lists come to mind, I believe I called them chains when I figured them out as I used them to chain together messages in my BBS software). I taught myself assembly using the VIC 20's Programmer's Reference Guide. I would hand assemble code, store them as decimal values in DATA statements, POKE them into memory and finally call them with SYS. I remember it took a long time to figure out 2's complement - my original backward branches were all written like this:

Branch:
   ...
   CMP #20
   BEQ Done
   JMP Branch
Done:

 

instead of like this:

Branch:
   ...
   CMP #20
   BNE Branch

 

I've updated that blog entry.

Edited by SpiceWare
Link to comment
Share on other sites

Thanks all for the clarification - I've run into terminology mismatches in the past where I'd figured out things on my own and didn't learn the official term until years later (Linked Lists come to mind, I believe I called them chains when I figured them out as I used them to chain together messages in my BBS software). I taught myself assembly using the VIC 20's Programmer's Reference Guide. I would hand assemble code, store them as decimal values in DATA statements, POKE them into memory and finally call them with SYS. I remember it took a long time to figure out 2's complement - my original backward branches were all written like this:

Branch:
...
CMP #20
BEQ Done
JMP Branch
Done:

 

instead of like this:

Branch:
...
CMP #20
BNE Branch

 

I've updated that blog entry.

 

Spice,

I'm tremendously impressed with not only your Assembly games but also the fact that you wrote a hardcore Assembly routine to hook the interrupt vectors so that BASIC BBS programs could transparently get data on and off the wire in the 80's! That's pretty awesome :)

 

And that you learned advanced Assembly (as is clear from those apps) using slightly different constructs and interpretations is an excellent illustration of how flexible Assembly is, and also that some of the concepts (many IMO) are completely unnecessary!

 

Tom and Andrew sure wrote fantastic games back then (and now) and I don't know if SvOlli, OmegaMatrix, Tjoppen, RevEng or eshu did but from conversation it certainly looks like they could have. I've spoken to a lot of other excellent Assembly coders here as well and my silly tounge-tied post the other day was a satirical reflection on the conversations we advanced coders sometimes have where no one else can figure out what it is we're talking about! :)

 

Programmer 1: I put the goop-de-gloop in the glip-dip and adjusted it five glicks.

Programmer 2: Ah yes, that's because it's a glark. It's always a glark!

 

One of the hardest things to do is to give someone directions to get to your home, just because it's so familiar.

 

Along these lines I'd love to hear what you all think my streamlined approach using action figures to teach advanced Assembly to the awesome bB coders here (Loon, RT and Cybearg immediately come to mind) :)

Link to comment
Share on other sites

Along these lines I'd love to hear what you all think my streamlined approach using action figures to teach advanced Assembly to the awesome bB coders here (Loon, RT and Cybearg immediately come to mind) :)

 

This might help explain my problem with assembly language:

 

randomterrain.com/rt-aspergers-syndrome-memory-eyesight.html#acronyms_abbreviations_mnemonics_programming

Link to comment
Share on other sites

RT,

wow I just read that and find your work writing original action games like SeaWeed Assault and superior-to-Breakout Breakout games like ChipOff even more inspiring and motivational given that you've built them despite all of that!

 

Your bB site is also inspiring, and I thought so before I knew you had any disabilties as per my comments urging you not to change the layout around!

 

And btw, you get two thumbs up from me and all of my pong champion friends at my last reto party who tried ChipOut and thought it was fantastic and just the right difficulty level - hard! (we all liked the first one better than the button cheat version for that reason) :) :)

 

Spice,

you're welcome! Very cool, looking forward to hearing your thoughts :)

Link to comment
Share on other sites

RT,

wow I just read that and find your work writing original action games like Seaweed Assault and superior-to-Breakout Breakout games like ChipOff even more inspiring and motivational given that you've built them despite all of that!

 

Your bB site is also inspiring, and I thought so before I knew you had any disabilities as per my comments urging you not to change the layout around!

 

And btw, you get two thumbs up from me and all of my pong champion friends at my last retro party who tried ChipOff and thought it was fantastic and just the right difficulty level - hard! (we all liked the first one better than the button cheat version for that reason) :) :)

 

Thanks. I've been hoping that I'd get a little more feedback on ChipOff so I'd know which version people like so far. As I said here, I'm thinking about letting the player choose from one of three ball sizes. I'm also thinking about letting the player choose between the current paddle size and a larger one. Before the game starts, the player would move the joystick left or right to select the ball size and move the joystick up and down to select the paddle size.

Link to comment
Share on other sites

Thanks. I've been hoping that I'd get a little more feedback on ChipOff so I'd know which version people like so far. As I said here, I'm thinking about letting the player choose from one of three ball sizes. I'm also thinking about letting the player choose between the current paddle size and a larger one. Before the game starts, the player would move the joystick left or right to select the ball size and move the joystick up and down to select the paddle size.

RT,

you're very welcome! Those are all cool options - I think a smaller paddle option for pong champions to test themselves with would nicely complement that featureset (selecting larger ball and smaller paddle would be an interesting combination). I think you should definitely make the cheat button an option players can select too; having it available all the time makes it too tempting to use :)

Link to comment
Share on other sites

RT,

you're very welcome! Those are all cool options - I think a smaller paddle option for pong champions to test themselves with would nicely complement that featureset (selecting larger ball and smaller paddle would be an interesting combination). I think you should definitely make the cheat button an option players can select too; having it available all the time makes it too tempting to use :)

 

Thanks. I'll start working on it and see what I can do.

Link to comment
Share on other sites

Spice,

you're welcome! Very cool, looking forward to hearing your thoughts :)

 

I haven't read thru it all, but it's quite nice. I would have used PNGs instead of JPGs for all the screen shots though. PNGs look much better and are very efficient for screen grabs, JPGs not so much. When you shrink the JPGs down to the same file size as a PNG, they look really bad.

 

97KB PNG

post-3056-0-49111600-1368742372_thumb.png

 

99KB JPG (about same size as a PNG)

post-3056-0-92041300-1368742379_thumb.jpg

 

257KB JPG (default export on Mac)

post-3056-0-66191900-1368742613_thumb.jpg

 

673KB JPG (almost as good looking as the PNG, but taking nearly 7x the storage)

post-3056-0-01012600-1368742639_thumb.jpg

  • Like 2
Link to comment
Share on other sites

I haven't read thru it all, but it's quite nice. I would have used PNGs instead of JPGs for all the screen shots though. PNGs look much better and are very efficient for screen grabs, JPGs not so much. When you shrink the JPGs down to the same file size as a PNG, they look really bad.

 

Thanks Spice! :) Thanks also for the tip about the PNG's, they're considerably clearer; I'm compiling it into a PDF ebook and I wish I had at least increased the detail level in the JPG's - I was trying to keep the JPG's filesize down (have a lot of images) but you really notice how lossy they are when you print it out on paper, I'm going to use PNG for future code shots and should probably redo some of the existing ones.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...