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

Assembling Source Code.

Thread Tools
 
Search this Thread
 
Old 09-21-2003, 07:30 PM
  #1  
Supreme Member

Thread Starter
 
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
Assembling Source Code.

Ok guys, I'm working on trying to get some source code to assemble. More specifically, the anht hac. There are three src files that need to be included that I don't have. They are: f2a.src, 8D_EQU.src, and 8D_ftest.src

Are these needed, or can I get rid of them? Are they additions, or patches, or just where the factory included the calib tables, and equates and such from a generic? I don't know!!!

Thanks!
Old 09-21-2003, 07:35 PM
  #2  
Supreme Member

Thread Starter
 
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
A quick update:
I commented out those 3 lines and got a bunch more errors. I'm gonna look into them when I get time later tonight.

Any input will be appreciated!
Old 09-23-2003, 08:28 PM
  #3  
Supreme Member

Thread Starter
 
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
Well, I've been messing with the code some more, and now the assembler I'm using (ASM11d84) doesn't seem to like the L5000 address that's unassigned. That's the first error I need to get over. I have told it to use direct addressing for that line, and it changes it to a warning. Do I have to do this for all the addresses that are directly addressed (not previously defined)?

Hmmm.... Maybe when I get this working, I'll post a ECM Source Code for dummies so that someone else will be able to get help.
Old 09-24-2003, 06:56 AM
  #4  
Moderator

iTrader: (1)
 
RBob's Avatar
 
Join Date: Mar 2002
Location: Chasing Electrons
Posts: 18,432
Likes: 0
Received 225 Likes on 211 Posts
Car: check
Engine: check
Transmission: check
Originally posted by JP84Z430HP
Well, I've been messing with the code some more, and now the assembler I'm using (ASM11d84) doesn't seem to like the L5000 address that's unassigned. That's the first error I need to get over. I have told it to use direct addressing for that line, and it changes it to a warning. Do I have to do this for all the addresses that are directly addressed (not previously defined)?

Hmmm.... Maybe when I get this working, I'll post a ECM Source Code for dummies so that someone else will be able to get help.
You know, I saw your post once before and meant to respond. . . sorry about that.

Yes, comment out the include files (.src) as you did. Then for all of the memory locations that are not in the EPROM you will need an EQU. Start at L0000 and go through to L01FF and do this:

Code:
.
.
.
L01B0	EQU $1B0	; 
L01B1	EQU $1B1	; 
L01B2	EQU $1B2	; 
L01B3	EQU $1B3	; 
L01B4	EQU $1B4	; 
L01B5	EQU $1B5	; 
L01B6	EQU $1B6	; 
.
.
.
You will also need to do other areas, there are the SCI ports in the L4000 range, ECM hardware registers in the L3FC0 range, along with some others.

The assembler will complain every time another is found. Here is another block of them:

Code:
; --------------------------------------
; HU RAM Equates
; --------------------------------------

L0456	EQU	$0456	; 
L0457	EQU	$0457	; 
L0458	EQU	$0458	; 
L0459	EQU	$0459	; 
L045B	EQU	$045B	; 
L045C	EQU	$045C	; 
L045E	EQU	$045E	; 
L0463	EQU	$0463	; 
L0465	EQU	$0465	; 
L0467	EQU	$0467	;
Once these are all in place is becomes a handy area to add a comment for what they are:

Code:
L3FC0	EQU	$3FC0	; DRP, Ref Period Timer
L3FC2	EQU	$3FC2	; Timer #1 (Input 5)
L3FC4	EQU	$3FC4	; Timer #2 (Input 6)
L3FC6	EQU	$3FC6	; Cntr #1 (*** Pulses)
RBob.
Old 09-24-2003, 08:00 AM
  #5  
Supreme Member

Thread Starter
 
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
Awesome! I didn't know if I had to go throught all that, or if the thing could use direct addressing. I've done a SMALL amount of assembly code before (modifying what was already there!!!) so hopefully, once I get this assembling, I'll be able to get it in gear!

Oh yeah, commenting is crucial IMO. Makes a world of difference when you go to make changes!

Thanks for the response, and the examples! As soon as I get it assembling, I plan to take notes on what stuff I change, and possibly put that up on a web site for people to see. The only thing that worries me is keeping it IN the hands of the DIY crowd, and OUT of the hands of the profiteers....
Old 09-25-2003, 12:49 PM
  #6  
Junior Member
 
novakm's Avatar
 
Join Date: Mar 2003
Posts: 73
Likes: 0
Received 0 Likes on 0 Posts
I'm also trying to assemble source code, But I don't think I am using the assembler right (asm11d84).

I disassembled my bin using CATS. I fixed errors one by one, and now it goes through pass 1 with no errors. When it's done, I get the following:

Warning: insufficient heap memory <use MAPOFF> skipped
Assembled changed.src <11564 lines> 11562 bytes
1 file processed!

When I look for an output file, I can't find one.

Am I even close to getting this right?
Does anyone have a good source file that I can practice assembling with, just to make sure i'm using as11 right? (I copied Aujp.HAC) and tried that, but it does not seem to copy to notepad correctly from PDF.
Old 09-25-2003, 07:00 PM
  #7  
Supreme Member

Thread Starter
 
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
Yeah, I'mhaving the copy from pdf problem also. I had to go through and put all the tabs back in that it needed. Man what a pain! Then I found out that there are some pdf to txt converters out there, but that was after I got the file tabbed back the way it should be.

I just finished the equates on the anht hac, and now I'm movin on to the other errors.

Are some of the errors that I've seen in there from GM's original code? I can't remember what they were, but a few of them wouldn't stop it from compiling, but something was obviously wrong in it...
Old 09-26-2003, 06:59 AM
  #8  
Moderator

iTrader: (1)
 
RBob's Avatar
 
Join Date: Mar 2002
Location: Chasing Electrons
Posts: 18,432
Likes: 0
Received 225 Likes on 211 Posts
Car: check
Engine: check
Transmission: check
Originally posted by JP84Z430HP
I just finished the equates on the anht hac, and now I'm movin on to the other errors.

Are some of the errors that I've seen in there from GM's original code? I can't remember what they were, but a few of them wouldn't stop it from compiling, but something was obviously wrong in it...
It depends upon the error. Assemblers will be a little different from one another. IOW some will be able to handle a FILL directive whereas others will not. Some don't like spaces between comma delimited values "100, 102" needs to be: "100,102". Stuff like that.

Another thing to remember is that the ANHT hac is not perfect. There are a couple of typo's along with a table or two that are the wrong length (number of rows).

Once you get a bin created from the assembled source do a binary compare against a true copy of ANHT.BIN. This will show you where the differences are. Then work on them (from the beginning) until it creates a comparable bin.

A table missing from ANHT_hac is the SA vs coolant. Was probably in the F2A.SRC file:

Code:
;=======================================
;
; COOL SA TBL, 12 BLKS
; $8138 - $81A7
;
; TBL = (VAL + L8137) * (256/90)
;=======================================

L8138:	FCB	32	; START AT -16
	FCB	 0	;
	FCB	 9	;

; VAC        20   30   40   50   60   70   80   90  100 ; Deg C

	FCB 100, 100, 114, 108,  94,  77,  77,  77,  77	; -16
	FCB 100, 100, 114, 108,  94,  77,  77,  77,  77	;  -4
	FCB 100, 100, 114, 108,  94,  77,  77,  77,  77	;   8
	FCB  85,  85,  85,  85,  85,  77,  77,  77,  77	;  20
	FCB  57,  85,  85,  85,  85,  77,  77,  77,  77	;  32
	FCB  57,  85,  85,  85,  85,  77,  77,  77,  77	;  44
	FCB  57,  57,  57,  57,  57,  57,  57,  57,  57	;  56
	FCB  57,  57,  57,  57,  57,  57,  57,  57,  57	;  68
	FCB  57,  57,  57,  57,  57,  57,  57,  57,  57	;  80
	FCB  57,  57,  57,  57,  57,  57,  57,  57,  57	;  92
	FCB  57,  57,  57,  57,  57,  57,  57,  57,  57	; 104
	FCB  57,  57,  57,  57,  51,  40,  40,  40,  40	; 116
RBob.
Old 09-26-2003, 08:19 AM
  #9  
Supreme Member

Thread Starter
 
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
Thanks for your help RBob!

The errors I'm talking about aren't affecting the assembly, but more things that just don't seem right, I'll have to find an example next time I'm in there working on it. The, too, it may be just typo's in the hac!

Thanks for the SA table though! I see where it goes, and I'm gonn drop what ya sent in there, just to make it closer, then I'll see about making it "Right"!

Thanks again, and be prepared, I'll prolly have more issues as I get deeper into this!
Old 09-26-2003, 12:07 PM
  #10  
Junior Member
 
novakm's Avatar
 
Join Date: Mar 2003
Posts: 73
Likes: 0
Received 0 Likes on 0 Posts
I'm down to 8 errors. (and 1000's of warnings)

All look like this:

"ERR* ANHT.TXT (11885) "LD6B5" is too far forward [4], use jumps"


Code:
LD62E:  BRCLR   L0046,#$20,LD63F            ; BR IF NOT b5 
                                            ;  B5 1 = IN PWR ENRICH
                                            ; ... else
        LDAB    L010E                       ; GET PORT AIR TMR
        CMPB    0,X
        BEQ     LD6B5                       ; DIVERT IF IN P.E. TOO LONG
                                            ; ... else
        INCB                                ; INCR PORT AIR TIMER
        STAB    L010E                       ; SAVE NEW PORT AIR TMR
                                            ;
        BRA     LD6A0                       ;
LD63F   CLR     L010E                       ; PORT AIR TMR
The instructions say I should either rewrite to use JMP or move them closer together.

What's the advice?

Thanks
MIke
Old 09-26-2003, 01:16 PM
  #11  
Moderator

iTrader: (1)
 
RBob's Avatar
 
Join Date: Mar 2002
Location: Chasing Electrons
Posts: 18,432
Likes: 0
Received 225 Likes on 211 Posts
Car: check
Engine: check
Transmission: check
Originally posted by novakm
I'm down to 8 errors. (and 1000's of warnings)

All look like this:

"ERR* ANHT.TXT (11885) "LD6B5" is too far forward [4], use jumps"
.
.
.
The instructions say I should either rewrite to use JMP or move them closer together.

What's the advice?

Thanks
MIke
Either there is extra code or the assembler is calculating the # of bytes to branch incorrectly. May want to check for extra code first as it is close:
Code:
 27 7c            BEQ     LD6B5           ; DIVERT IF IN P.E. TOO LONG
The 27 7c is the BEQ LD6B5 instruction. The 7c is the number of bytes to pass over on the branch. The max is 7f, 3 more bytes.

RBob.
Old 09-26-2003, 02:32 PM
  #12  
Junior Member
 
novakm's Avatar
 
Join Date: Mar 2003
Posts: 73
Likes: 0
Received 0 Likes on 0 Posts
RBob,

Thanks for the help.

I checked line for line against the one I dissasembled from a .BIN, and I cannot find extra code. Must be something else the assembler is picking up.

I'm gonna keep looking

Mike
Old 09-26-2003, 06:56 PM
  #13  
Supreme Member

Thread Starter
 
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
RBob,
I put that table in, but I couldn't just add it in the way you had it in the post. I had to drop each line down like in the other tables. I ran it through the assembler, and it checked out ok, so I think it'll work ok.

NovaKM,
I'll let you know when, but I'm working on putting what I'm working with on the web, and I'll update it when I get things changed around. Right now, I'm primarily working on the way the code looks. I put all the equates in order, as I plan to comment them, and it will be easier to find them if they're in order. It also proved to be a good exercise to bruch up on HEX. I'll get ya a link soon!
Old 09-26-2003, 08:10 PM
  #14  
Supreme Member

Thread Starter
 
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 have put up a link on my webspace, along with the hac that I'm working on. I'll try to keep it updated, along with notes on what I'm doing with it.

Oh yeah, Here's the link:
http://home.alltel.net/jporter12/

As you can prolly tell, I have no life, that's why I'm in front of the computer on Friday night! LOL I'm going to go get some beers now!

Last edited by JP84Z430HP; 09-26-2003 at 08:12 PM.
Old 09-27-2003, 12:55 PM
  #15  
Junior Member
 
novakm's Avatar
 
Join Date: Mar 2003
Posts: 73
Likes: 0
Received 0 Likes on 0 Posts
JP,

Thanks for the link. It assembles with no errors! congratulations!:hail:
I cut a "problem" section of code from my attemptand pasted it into yours, and that assembled also.

There must be something elsewhere my code that's messing me up.

Thanks again

Mike
Old 09-27-2003, 01:16 PM
  #16  
Junior Member
 
novakm's Avatar
 
Join Date: Mar 2003
Posts: 73
Likes: 0
Received 0 Likes on 0 Posts
I found the issue

The equates need to be at the beginning of the code. I had them at the end.

Mike
Old 09-28-2003, 09:45 AM
  #17  
Supreme Member
 
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
I'm still new at this, but looks good to me.
You've gotten alot further on the 8D then I have.
Old 10-02-2003, 07:38 PM
  #18  
Junior Member
 
novakm's Avatar
 
Join Date: Mar 2003
Posts: 73
Likes: 0
Received 0 Likes on 0 Posts
Well, I've almost got it.

Did a byte by byte compare with a known good ANHT BIN after getting it to assemble. Took a lot of time to fix each place where they did not match (there were thousands). Most were caused by typos.

only things left now are how to fill large areas of the BIN with $00. The assembler uses $FF by default

There are also a few lines at FFEE to FFFF that are not in the HAC.

MIke
Old 10-03-2003, 06:46 AM
  #19  
Moderator

iTrader: (1)
 
RBob's Avatar
 
Join Date: Mar 2002
Location: Chasing Electrons
Posts: 18,432
Likes: 0
Received 225 Likes on 211 Posts
Car: check
Engine: check
Transmission: check
Originally posted by novakm
Well, I've almost got it.

Did a byte by byte compare with a known good ANHT BIN after getting it to assemble. Took a lot of time to fix each place where they did not match (there were thousands). Most were caused by typos.

only things left now are how to fill large areas of the BIN with $00. The assembler uses $FF by default

There are also a few lines at FFEE to FFFF that are not in the HAC.

MIke
Try the FILL directive. Some assemblers support it, others don't. IE: between the end of the cal data and beginning of the code:

FILL $00, $B000-*

RBob.
Old 10-04-2003, 08:05 PM
  #20  
Junior Member
 
novakm's Avatar
 
Join Date: Mar 2003
Posts: 73
Likes: 0
Received 0 Likes on 0 Posts
Well, I did IT! It assembles correctly. The BIN matches the stock ANHT perfectly. Even the checksum is OK.

Thanks Guys :hail:

My next step is to compare it to the AUJP BIN I use.

I think I learned a lot about programming in the process.
Old 10-05-2003, 01:45 AM
  #21  
Supreme Member

Thread Starter
 
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
Learning is the key to all of this! That is the primary reason that I am pursuing DIY-EFI, more to learn about how it works ( ideal with it at work but not to this level) and how to make it do what I want it to do!
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
hectre13
Car Audio
26
03-03-2022 05:38 PM
1Aauto
Sponsored Vendors
9
10-19-2016 08:50 AM
1Aauto
Sponsored Vendors
1
10-13-2015 03:06 PM
gord327
Transmissions and Drivetrain
19
10-03-2015 01:25 PM
dusterbd
TPI
0
09-29-2015 08:40 AM



Quick Reply: Assembling Source Code.



All times are GMT -5. The time now is 09:53 AM.