DIY PROM Do It Yourself PROM chip burning help. No PROM begging. No PROMs for sale. No commercial exchange. Not a referral service.

Assembly

Thread Tools
 
Search this Thread
 
Old 11-26-2004, 09:55 PM
  #1  
Supreme Member
Thread Starter
 
Grumpy's Avatar
 
Join Date: Jun 2000
Location: In reality
Posts: 7,554
Likes: 0
Received 1 Like on 1 Post
Car: An Ol Buick
Engine: Vsick
Transmission: Janis Tranny Yank Converter
Assembly

Is there something more along the lines of being in English then the Motorola Pink Book for understanding assembly?.
Old 11-26-2004, 11:52 PM
  #2  
Supreme Member
 
Morley's Avatar
 
Join Date: May 2002
Posts: 4,099
Likes: 0
Received 2 Likes on 2 Posts
Try here? http://www.avr-asm-tutorial.net/beginner_en.pdf
Old 11-27-2004, 03:04 AM
  #3  
Supreme Member

iTrader: (2)
 
dimented24x7's Avatar
 
Join Date: Jan 2002
Location: Moorestown, NJ
Posts: 9,962
Likes: 0
Received 3 Likes on 3 Posts
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
I dont think I even ever read that motorola thing... I jsut printed out the instructions and forgot about the rest. All that computer speak just confuses me. I still say you should do some programming in another high level language thats realatively simple. Try writing stupid programs like PONG or some sort of numerical manipulation like fractal generation. It really helps to sharpen your computer skills. Thats how I learned how to program. Jsut tried stuff 'till I got it to work. All a computer language really is is just a way to translate your logic into something the computer can understand.

Learning to program by doing assembly is like trying to get food in your stomach by sticking it up your ***. Its just too backwards and hard to see whats going on. If you know how to do basic computer programming and then you start again with assembly, its much easier IMHO. I actually like assembly more then any other language now.
Old 11-27-2004, 11:47 AM
  #4  
Senior Member

 
JPrevost's Avatar
 
Join Date: Oct 1999
Posts: 6,621
Likes: 0
Received 1 Like on 1 Post
Car: 91 Red Sled
Axle/Gears: 10bolt Richmond 3.73 Torsen
<-- instruction print out only as well
That Pink book gave me the biggest headache. I could only read like 1 page and I was fed up with it.
Google has a translate function, I wonder if they'd be inclined to add a "Motorola to English" option.
Old 11-27-2004, 12:51 PM
  #5  
Supreme Member

iTrader: (1)
 
JP86SS's Avatar
 
Join Date: Apr 2004
Location: Browns Town
Posts: 3,178
Likes: 0
Received 3 Likes on 3 Posts
Car: 86 Monte SS (730,$8D,G3,AP,4K,S_V4)
Engine: 406 Hyd Roller 236/242
Transmission: 700R4 HomeBrew, 2.4K stall
Axle/Gears: 3:73 Posi, 7.5 Soon to break
Un-learning the higher level language can be just as much of a problem. The higher stuff does alot for you that has to be figured out when doing the assembly. I'm using a software simulator to run little chunks of assembly code to help with the shifting and indexing stuff, just be able to follow some of it.
The pink book should be reduced to just the instruction set. I don't think 1 page is really helpful. Just creates new questions pertaining to every different hardware configuration the processor came with. Need to be a true gEEk to understand all that they are giving.
Old 11-27-2004, 03:01 PM
  #6  
Moderator

iTrader: (1)
 
RBob's Avatar
 
Join Date: Mar 2002
Location: Chasing Electrons
Posts: 18,408
Likes: 0
Received 217 Likes on 203 Posts
Car: check
Engine: check
Transmission: check
Appendix A (instruction set) of the pink book is invaluable. It is a reference to how the instructions operate. The rest of the book is not required for learning/using assembly on the GM ECMs.

Where the pink book is required is when one needs to know which condition code (CC) flags are set. How the carry flag is handled in rotates and shifts. It shows that a PSH or PUL does not set any CC flags. These types of items are required to be known if one wants to understand existing code, or to write new code.

RBob.
Old 11-27-2004, 04:00 PM
  #7  
Supreme Member

iTrader: (2)
 
dimented24x7's Avatar
 
Join Date: Jan 2002
Location: Moorestown, NJ
Posts: 9,962
Likes: 0
Received 3 Likes on 3 Posts
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
The only other chapter that was useful was the chapter on the general operation of the CPU. Theres some handy info there as well as some elaboration on how some of the operations work.

As far as having knowledge of other languages, I dont think I could have learned to do assembly if I hadnt done any programming before. Having that experience was invaluable.
Old 11-27-2004, 05:35 PM
  #8  
Senior Member

 
JPrevost's Avatar
 
Join Date: Oct 1999
Posts: 6,621
Likes: 0
Received 1 Like on 1 Post
Car: 91 Red Sled
Axle/Gears: 10bolt Richmond 3.73 Torsen
I honestly don't think it matters. It's all digital computer code.
It's like saying you're a better driver because you had a slow car as your first car. That just means you haven't driven a fast car for x amount of time compared to so and so.
Not that anybody cares but I learned how to program my Ti-80 calculator because I was tired of not having games on it (no transfer port). I had to "port" all my games by hand into my little graphing calculator. That led to me getting a Ti-86 which I was extensively working with, even had it reading databytes from the aldl from my car (it was also overclocked), then one day during a calc exam it just died outright. No turn on- no turn off, notta. So I got a Ti-89, best calculator in existance for the dollar. That died the same way but I was doing assembly code with that calculator.
I had played with writting batch files in DOS but I don't think that really counts. Then I did VB 3.0, it sucked, I hated it. Then I took a long break and eventually got TAUGHT my first language... Fortran (Compaq Visual). It was so annoying having to declare everything. The good thing was that I learned how to organize code efficiently AND format data types. That led to Visual Basic 6.0, didn't know what I was doing so I met RBob. He showed me the assembly stuff and talked about it at a level I could understand. That led me to printing his commented hack for the 8746 at least 3 times through. First 2 times skipping over the actual code and just looking at the RAM and FCB FDB stuff in the eprom. The 3rd time through I actually tried to read and flip to sections, I got bored and lost my sanity. Got lockers, RBob didn't give me his "real-time display" software so I tried programming my own. Visual basic didn't give me enough control over the comm port so I wasted 5 months pulling my hair out. Grad student sold me his license for LabView 7 and haven't looked back. Took me only a week to get a fully working "HUD." I was hooked, visual high level with low level abilities. So now I'm explusively programming in VB 6.0, LabView, and dabling with assembly. I think for my major (ME) I'm about 2 years ahead of the average graduated EE with this assembly stuff. They only know how to turn light bulbs on with a 68hc11. It's like, uh.... GM's has like 100 times less overhead than the most advanced undergrad EE project.
Old 11-27-2004, 06:27 PM
  #9  
Supreme Member

iTrader: (2)
 
dimented24x7's Avatar
 
Join Date: Jan 2002
Location: Moorestown, NJ
Posts: 9,962
Likes: 0
Received 3 Likes on 3 Posts
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
TI 89 calcs RULE!!! I have one on my desk at all times.

I too had to take fortran in college. That was like 6 or 7 years ago so ive forgotten it all by now. What a complete waste of time. For the exams, they made you write programs and debug stuff on paper. How does that relate to anything? A piece of paper cant compile and run my program, can it? Tehy finally canned that since there is also a course required on MATLAB.

I know its different for everyone, but for me the slow car is the way to learn how to drive without getting in over your head. With a high level language, debugging and seeing whats going on is alot easier then assembly. All I have there is the output, if there is any at all. If theres a problem I have to go through and manually trace through everything to find the mistake or the logic flaw. Cant really call out like you can in something like C or basic. One of the more interesting problems so far was when I forgot to specify an index register load as immediate rather then direct. Loaded in the contents of the memory address rather then the address itself. Dont know exactly what the ecm tried to access but it immediatly locked up when I went to run it.
Old 11-29-2004, 11:18 AM
  #10  
TGO Supporter
 
AlexJH's Avatar
 
Join Date: Jul 2000
Posts: 812
Likes: 0
Received 1 Like on 1 Post
Engine: 5.7L V8
Transmission: 700R4
I mentioned it in another thread a while back, but I think it's worth mentioning again.

Bebop to the Boolean Boogie is a great book for learning about how computer logic/math works, and it gives you a good foundation for working with assembly, ie why there is a register that has a carry flag, zero flag, etc, etc. I know the name sounds like it's aimed at kids, but even adults might be able to learn something.

Another good page to check out is 'The Art of Assembly Programming'

http://webster.cs.ucr.edu/

Or maybe you could get a Handyboard (http://handyboard.com/) to play around with, try making a robot that can follow a line or something like that, rather than killing your engine.
Old 11-29-2004, 11:35 AM
  #11  
Supreme Member

iTrader: (2)
 
dimented24x7's Avatar
 
Join Date: Jan 2002
Location: Moorestown, NJ
Posts: 9,962
Likes: 0
Received 3 Likes on 3 Posts
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
If you dont like buying stuff you can also use teh cars computer. You dont have to run the stock code. Do some basic stuff to initialize it (just make sure the interrupts/COP are disabled) and then you can put whatever on the prom. I experimented with the inputs and outputs, math operations, etc. before I really started doing anything.

The hardest thing for me is still the binary math operations. Absoluty horrible at binary, but getting better. Have to work it out on paper before I do something.
Old 11-29-2004, 11:40 AM
  #12  
Supreme Member

iTrader: (2)
 
dimented24x7's Avatar
 
Join Date: Jan 2002
Location: Moorestown, NJ
Posts: 9,962
Likes: 0
Received 3 Likes on 3 Posts
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
As for assemby, are there any sites like that for the motorola assembly? Im thinking no since its old and crusty.
Old 11-29-2004, 11:43 AM
  #13  
Senior Member

 
JPrevost's Avatar
 
Join Date: Oct 1999
Posts: 6,621
Likes: 0
Received 1 Like on 1 Post
Car: 91 Red Sled
Axle/Gears: 10bolt Richmond 3.73 Torsen
Originally posted by dimented24x7
As for assemby, are there any sites like that for the motorola assembly? Im thinking no since its old and crusty.
I was looking and I think there might be something we could do (you could do ).
http://webster.cs.ucr.edu/AsmTools/HLA/index.html
High Level Assembly, get the assembler and you can edit the source depending on the processor, this might take a while because the instructions book is rather long but it would be one cool winter project.
Old 11-29-2004, 12:31 PM
  #14  
TGO Supporter
 
AlexJH's Avatar
 
Join Date: Jul 2000
Posts: 812
Likes: 0
Received 1 Like on 1 Post
Engine: 5.7L V8
Transmission: 700R4
Some 'gems' here. May be obvious depending on how much asm you've done.

http://www.df.lth.se/~john_e/gems.html

Some details on binary math (signed vs unsigned always trip people up):

http://www.faqs.org/docs/air/tsfloat.html
http://www.math-cs.gordon.edu/local/...03/binary.html

Last edited by AlexJH; 11-29-2004 at 12:42 PM.
Old 11-29-2004, 01:42 PM
  #15  
Supreme Member
Thread Starter
 
Grumpy's Avatar
 
Join Date: Jun 2000
Location: In reality
Posts: 7,554
Likes: 0
Received 1 Like on 1 Post
Car: An Ol Buick
Engine: Vsick
Transmission: Janis Tranny Yank Converter
Guys, I looking for the Intro to *The idiots guide to assembly*.
Think some one that's old, with a failing memory that's trying to home study his way into it, that's never had a semester of anything computer related.
Old 11-29-2004, 05:34 PM
  #16  
Supreme Member

iTrader: (2)
 
dimented24x7's Avatar
 
Join Date: Jan 2002
Location: Moorestown, NJ
Posts: 9,962
Likes: 0
Received 3 Likes on 3 Posts
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
I can definatly appriciate that. Cant stay young forever and Im sure we'll all encounter that sooner or later.

One thing I would do is study those links on binary math quite closely. Once you have a handle on how the binary operations work then itll be easier to understand how to perform logical operations and math. Im so-so with it at best. I can understand the basics but some of the higher stuff gives me trouble. When I made some 24 and 32 bit math routines I had to spend some time working it all out beforehand to ensure that they would give the correct outputs and work properly.

I wouldnt get too intimidated by that stuff up there, its not our motorola assembly. I think when this motorola assembly was first created, polyester leisure suites and disco where still in vogue. It doesnt look anywhere near as painful as the x86 stuff shown in those pages.

One reason I harp on knowing higher level languages is that there are alot of nice parallels between commands in assembly and a higher language. For example:

An if command in, say, C looks like this:

if(x > 10) //If number X is greater then 10, do the following
{
y++; //increment y by one
}

in assembly it would be:

X EQU (some number or address) ;X EQUals...
Y EQU (some other number or address) ;Y EQUals...
;
; load up our variables
;
LDAA X ;load X into accumulator A
LDAB Y ;load Y into accumulator B
;
; Heres our if command...
;
CMPA #10 ;Compare contents of A immediatly with the number 10
BLS LABEL ;Bra if X less then or the same as 10, dont mess with Y yet
;
INCB ; X > 10, so increment Y by one
;
LABEL {some other crap you want to execute}

Another reason that its important to have some experince with a structured language is that it teaches one how to organize code in a logical fashion. In assembly, there isnt really any structure imposed. Whats written down in pneumonics is what the cpu gets as machine code. If it doesnt work, oh well. No error codes from the ecm, just some nonsense, or even worse, a dead ringer.

I dont think its absolutly necessary, but youll have a firmer grasp if you understand some fundamentals. Unfortunatly, it doesnt seem like there are any easy to understand manuals for computers these days. Nothing quite like my 'Easy Programming with C' book anymore. 200 pages of color pictures and text that reads like a doctor Suise book.
Old 11-29-2004, 06:05 PM
  #17  
Senior Member

 
JPrevost's Avatar
 
Join Date: Oct 1999
Posts: 6,621
Likes: 0
Received 1 Like on 1 Post
Car: 91 Red Sled
Axle/Gears: 10bolt Richmond 3.73 Torsen
I GOT IT!!! How about this;
Replace the shorthand with real words!
LDAA replaced with Load into A
CMPA replaced with Compare A to
BLS replaced with Branch if A less than

I know this is done in the hacks but it would be nice to have the assembler recognize long hand.
This way you can read the code outloud and it makes sence to other people, not only you .
I love Visual Basic more so than C++ because it's so flexable and the code is written closely to how I think to myself. Having less { } and declerations, no colors, no help and lots of shorthand make for a very steap learning curve.
Old 11-29-2004, 06:25 PM
  #18  
TGO Supporter
 
AlexJH's Avatar
 
Join Date: Jul 2000
Posts: 812
Likes: 0
Received 1 Like on 1 Post
Engine: 5.7L V8
Transmission: 700R4
Originally posted by JPrevost

I love Visual Basic more so than C++ because it's so flexable and the code is written closely to how I think to myself. Having less { } and declerations, no colors, no help and lots of shorthand make for a very steap learning curve.
No colours!? You must be using the wrong editor...
Attached Thumbnails Assembly-highlight.jpg  
Old 11-29-2004, 07:25 PM
  #19  
Supreme Member

iTrader: (2)
 
dimented24x7's Avatar
 
Join Date: Jan 2002
Location: Moorestown, NJ
Posts: 9,962
Likes: 0
Received 3 Likes on 3 Posts
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
Woah... that is colorful.

I guess the whole idea behind the pneumonics is that its a short abriviation for what the machine code represents and it allows you to quickly type the commands. It would be nice to have it recognise each. That way you can either type it out, or if your in a hurry, just type the pneumonics.

I dont think the pneumonics are any worse then people typing IMO, IOW, PW, CAI, etc. Some of all of those stupid abreviations took me awhile to figure out. At least no-one around here uses AIM speak. 'I nd 4U 2 help me l8r' Man I hate that crap...
Old 11-29-2004, 07:30 PM
  #20  
Supreme Member

iTrader: (2)
 
dimented24x7's Avatar
 
Join Date: Jan 2002
Location: Moorestown, NJ
Posts: 9,962
Likes: 0
Received 3 Likes on 3 Posts
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
Originally posted by JPrevost
I GOT IT!!! How about this;
Replace the shorthand with real words!
LDAA replaced with Load into A
CMPA replaced with Compare A to
BLS replaced with Branch if A less than

I know this is done in the hacks but it would be nice to have the assembler recognize long hand.
This way you can read the code outloud and it makes sence to other people, not only you .
I love Visual Basic more so than C++ because it's so flexable and the code is written closely to how I think to myself. Having less { } and declerations, no colors, no help and lots of shorthand make for a very steap learning curve.
I wish I had VB. Never got to use it. Loaned it out to a family friend and never got it back.

One day you WILL appreciate the pneumonics Those things practically fly out of my fingers on their own. Nice and short so I dont have to think about typing them when I program. Confusing as hell to look at, though.
Old 11-29-2004, 07:41 PM
  #21  
Supreme Member

iTrader: (2)
 
dimented24x7's Avatar
 
Join Date: Jan 2002
Location: Moorestown, NJ
Posts: 9,962
Likes: 0
Received 3 Likes on 3 Posts
Car: 88 Camaro SC
Engine: SFI'd 350
Transmission: TKO 500
Axle/Gears: 9-bolt w/ 3.23's
Originally posted by Grumpy
Guys, I looking for the Intro to *The idiots guide to assembly*.
Think some one that's old, with a failing memory that's trying to home study his way into it, that's never had a semester of anything computer related.
Getting back to the origional topic. I think the best thing would probably be a writeup with some down to earth explanation of the commands with maybe some basic examples of how each might be used. Anyone up to writing something like this?
Old 11-29-2004, 08:31 PM
  #22  
Junior Member

 
89350STRO's Avatar
 
Join Date: Mar 2004
Location: Atlanta, GA
Posts: 40
Likes: 0
Received 0 Likes on 0 Posts
Grumpy,

Here is a link to a 68HC11 specific site.

http://www.cs.nmsu.edu/~pfeiffer/cla...joy-of-coding/

Here is another site that has labs set up as tutorials, the only ones that are working are labs 1, 2, and 3. But it's a start.

http://www.etcheverrys.com/aaron/web...haptermenu.htm

Here is a site with 68HC11 FAQS.

http://www.faqs.org/faqs/microcontroller-faq/68hc11/

I also have several good files that I would be glad to send you or anyone. Just send me an email: hotrod55man@yahoo.com

89350STRO
Old 11-29-2004, 09:12 PM
  #23  
Senior Member

 
JPrevost's Avatar
 
Join Date: Oct 1999
Posts: 6,621
Likes: 0
Received 1 Like on 1 Post
Car: 91 Red Sled
Axle/Gears: 10bolt Richmond 3.73 Torsen
I agree, the typing it all out does get annoying sometimes, but that's why they've got autofill which is nice. So here's another idea that'll make you learn the abrevs. When you type the code, the comments are done for you automatically . That would be worth it and speed up coding. Or has that been done already, lol. I'm way behind on this stuff so it wouldn't suprise me.

Last edited by JPrevost; 11-29-2004 at 09:23 PM.
Old 11-29-2004, 09:31 PM
  #24  
Supreme Member

 
JP84Z430HP's Avatar
 
Join Date: Feb 2000
Location: Johnstown, Ohio
Posts: 1,416
Likes: 0
Received 0 Likes on 0 Posts
Car: 84 Z28
Engine: 355 (fastburn heads, LT4 HOT cam)
Transmission: 700R4
Axle/Gears: 9-bolt, 3.27
Alex, What is that pretty editor you're using? And where can I get a copy?

89350stro, If very many people want the files you have (I would like to take a look) I can put them up on my my site (zip file) and put a link here for it.....

I think the best thing would probably be a writeup with some down to earth explanation of the commands with maybe some basic examples of how each might be used. Anyone up to writing something like this?
This was most of my purpose behind the "Source Code for Dummies" post I made, but it ended up being a "How to get you bin to disassemble and reassemble and work", which is all good, as it seems to have gotten more people interested in Source Coding....

I'm still lagging behind myself due to a lack of time to learn what all the pneumonics mean, and the binary stuff.....
Old 11-29-2004, 09:56 PM
  #25  
Junior Member

 
89350STRO's Avatar
 
Join Date: Mar 2004
Location: Atlanta, GA
Posts: 40
Likes: 0
Received 0 Likes on 0 Posts
I'd be glad to send you the files I have gathered. Just send me your email address.

89350STRO
Old 11-29-2004, 10:33 PM
  #26  
Supreme Member

 
JP84Z430HP's Avatar
 
Join Date: Feb 2000
Location: Johnstown, Ohio
Posts: 1,416
Likes: 0
Received 0 Likes on 0 Posts
Car: 84 Z28
Engine: 355 (fastburn heads, LT4 HOT cam)
Transmission: 700R4
Axle/Gears: 9-bolt, 3.27
I'm glad to see this finally going somewhere! I just looked at one of the first posts that Bruce made, and it was back in 2001.....3 1/2 years ago!
Old 11-30-2004, 11:05 AM
  #27  
TGO Supporter
 
AlexJH's Avatar
 
Join Date: Jul 2000
Posts: 812
Likes: 0
Received 1 Like on 1 Post
Engine: 5.7L V8
Transmission: 700R4
JP84Z430HP, it's called vi, and it's available from http://www.vim.org

It's a very powerful editor, but it's got a steep learning curve. You don't really need a mouse for it, all of the commands are available through the keyboard, ie to delete 3 lines you would type 'd3d' etc. I've been using it for about 5 years and I still don't know it all.

Give it a try, but be sure to read a tutorial on getting started, otherwise you'll get frustrated with it. I did the first time around, but after I watched other people use it, I came back and learned how to use it properly and never looked back.
Old 11-30-2004, 08:13 PM
  #28  
Supreme Member

iTrader: (1)
 
JP86SS's Avatar
 
Join Date: Apr 2004
Location: Browns Town
Posts: 3,178
Likes: 0
Received 3 Likes on 3 Posts
Car: 86 Monte SS (730,$8D,G3,AP,4K,S_V4)
Engine: 406 Hyd Roller 236/242
Transmission: 700R4 HomeBrew, 2.4K stall
Axle/Gears: 3:73 Posi, 7.5 Soon to break
Originally posted by JP84Z430HP

This was most of my purpose behind the "Source Code for Dummies" post I made, but it ended up being a "How to get you bin to disassemble and reassemble and work", which is all good, as it seems to have gotten more people interested in Source Coding....

Sorry that one went off into left field but it did turn out some good info. I've plucking away at it to keep the assembly notes growing as I stumble on the "first time" figuring something out.
There's another thread with some other editors too "cleaning .asm" by Grumpy. allot of the "assembly" info I'm finding is "computer" based and doesn't seem to fit (for me anyway)

I wish there was a way of keeping the op codes next to the commands so you can see what the data type and addressing that is being used for it. All the assemblers puke when you try to complile it though.

Another thread keeping to just assembly "how this part works" would be cool. Lookup routines etc that are used in different masks, 3D table structures and how to adjust or reconfigure them etc. Maybe we can keep it on track.

Or we can keep adding to the original
Jp
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
3GZJerry
LSX and LTX Parts
7
10-14-2015 05:17 PM
oil pan 4
Fabrication
2
10-06-2015 11:56 AM
skinny z
Engine/Drivetrain/Suspension Parts for Sale
5
10-05-2015 06:23 PM
gord327
Transmissions and Drivetrain
19
10-03-2015 01:25 PM
Dragonsys
Engine/Drivetrain/Suspension Parts for Sale
2
09-25-2015 03:51 PM



Quick Reply: Assembly



All times are GMT -5. The time now is 01:43 PM.