6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 5:17 pm

All times are UTC




Post new topic Reply to topic  [ 40 posts ]  Go to page Previous  1, 2, 3
Author Message
 Post subject:
PostPosted: Thu May 11, 2006 4:25 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1748
Location: Sacramento, CA
No, there is no linker needed.

:? However, my last post was in error. Here is the help screen from TASS.
Code:
Syntax:  TASS [options] source [object] [listing]
/?, /h   Display this help screen
/w       Ignore warning messages
/n       Generate nonlinear output file
/c       Allow 65C02 mnemonics
/a       Convert ASCII to PETASCII
/m       Don't put monitor code into listing
/s       Don't put source code into listing
/l<name> Generate a file with all labels


The /L switch adds a label file, not an assembly listing.

My standard TASS command line looks something like this:
Code:
TASS source.asm source.obj source.lst

where source.asm is the source file, the binary object file is source.obj, and the assembly listing is source.lst

I use a batch file to call TASS (thats why I was wrong in my earlier post...I didn't have my working TASS computer running and I tried to use my memory... I must remember to expand it from 1kx8 to a 2kx8 :) )

Here is the batch file:

Code:
c:
cd\design\tass
tass %1 tass.obj tass.lst


This way, I can drag a source file from Windows Explorer and drop it on the batch file. The output files are labeled "tass.obj" and "tass.lst" Those get overwritten each time I call TASS.

Hope this clears things up!

Daryl


Top
 Profile  
Reply with quote  
 Post subject: NO DIFFERENCE
PostPosted: Sun May 14, 2006 4:24 am 
Offline

Joined: Tue Oct 11, 2005 4:59 am
Posts: 15
The situation is still the same with the downloaded TASS assembler. Both the OBJ and the LST files are trash. The command:

tass source.asm source.obj source.lst command did not work for the three.
It worked for two that is either tass source.asm source.obj or
tass source.asm source.lst. However both the obj and lst files were trash. Could it be that it was not working properly because the TASS software was not registered for commercial use as prompted below?

C:\design\tass>tass testprox.asm
6502 Turbo Assembler Shareware Version Copyright (c) 1997 Taboo Productions
This program HASN'T BEEN REGISTERED for use in commercial purposes!

Assembling file: testprox.asm
Error messages: None
Warning messages: None
Passes: 2
Range: $f000-$fffd
Remaining memory: 481k

_________________
folorunsoa


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun May 14, 2006 1:55 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1748
Location: Sacramento, CA
the only issue with not registering is that you cannot use the CMOS instruction set. In other words, the "/c" option is disabled.

I'm not sure why your output files are being corrupted.

Daryl


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon May 15, 2006 1:03 pm 
Offline

Joined: Tue Oct 11, 2005 4:59 am
Posts: 15
How I wished things had worked out positively for me so I can smile. Instead, I am now at my wit's end. In despiration I went on to download TASM28 from www.programmersheaven.com. It generated list file alright but it was all errors (44 Errors). Can you please help? The TESTPRO.ASM file is attached below.

Thank you.


;T-Junction SIGNALLISATION

CODE1=$F800 ;LIGHTING SEQUENCE
CODE2=$F810 ;LIGHTING SEQUENCE
TIME =$F820 ;TIMING SEQUENCE
DDRA =$A003 ;DATA DIRECTION REG.A
DDRB =$A002 ;DATA DIRECTION REG.B
IOPA =$A001 ;O/P PORT A
IOPB =$A002 ;O/P PORT B
T1CL =$A005 ;T1 COUNTER LOW
T1CH =$A006 ;T1 COUNTER HIGH
IFR =$A00D ;INTERRUPT FLAG REG.
MEM1 =$0100 ;TEMPORARY MEMORY
MEM2 =$0101 ;TEMPORARY MEMORY
MEM3 =$0102 ;TEMPORARY MEMORY

.ORG $F800
.BYTE $92,$51,$30,$30,$28,$25,$26,$26,$6E
.ORG $F810
.BYTE $12,$12,$96,$99,$95,$B3,$43,$22,$12
.ORG $F820
.BYTE $0F,$05,$03,$0B,$05,$03,$09,$05,$03

.ORG $F000
START
LDA #$ff ;INITIALISE DDRA
STA DDRA ;AND DDRB AS
STA DDRB ;OUTPUT REGISTERS
L1 LDX #$08 ;LOAD REG.X WITH SEQUENCE VALUE
L2 LDA $F800,X ;LOAD ACC. WITH CODE1 INDEX X
STA IOPA ;STORE IN I/O PORT PA
LDA $F810,X ;LOAD ACC. WITH CODE2 INDEX X
STA IOPB ;STORE IN I/O PORT PB
JSR TIMER ;CALL DELAY
DEX ;DECREMENT REG.X
BPL L2 ;IF PLUS REPEAT
JMP L1 ;BEGIN AGAIN

;TIMER SUBROUTINE

TIMER LDA $F820,X ;LOAD ACC. WITH TIMING INDEX X
STA MEM1 ;STORE IN TEMPORARY MEMORY 1
JSR INTVL ;CALL 1.00-SEC INTERVAL
L3 DEC MEM1 ;DECREMENT MEMORY 1
BPL L3 ;IF PLUS REPEAT
RTS ;RETURN FROM SUBROUTINE

;1.00-SEC INTERVAL SUBROUTINE

INTVL LDY #$14 ;LOAD REG. Y WITH 20
L4 LDA #$50 ;INITIALISE VIA TIMER
STA T1CL ;COUNTER LOW & HIGH
LDA #$C3 ;TO OBTAIN A VALUE
STA T1CH ;OF 0.05 SEC.
TIMUT LDA IFR ;CHECK FOR
AND #$20 ;END OF
BEQ TIMUT;COUNT
DEY ;DECREMENT REG. Y TO COUNTDOWN
BNE L4 ;IF NOT REPEAT
RTS ;RETURN FROM SUBROUTINE
.ORG $FFFC ;RESET VECTOR
.BYTE $00,$F0
.END

_________________
folorunsoa


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon May 15, 2006 2:43 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1748
Location: Sacramento, CA
OK. I downloaded the TASM28 and tried it on your code.

I initially got 66 errors but was able to correct those.
It now compiles correctly.

This is the command line I used (my source file was named "test.asm")

TASM -65 test.asm

Here is the source code:
Code:
;T-Junction SIGNALLISATION

CODE1 =$F800 ;LIGHTING SEQUENCE
CODE2 =$F810 ;LIGHTING SEQUENCE
TIME =$F820 ;TIMING SEQUENCE
DDRA =$A003 ;DATA DIRECTION REG.A
DDRB =$A002 ;DATA DIRECTION REG.B
IOPA =$A001 ;O/P PORT A
IOPB =$A002 ;O/P PORT B
T1CL =$A005 ;T1 COUNTER LOW
T1CH =$A006 ;T1 COUNTER HIGH
IFR =$A00D ;INTERRUPT FLAG REG.
MEM1 =$0100 ;TEMPORARY MEMORY
MEM2 =$0101 ;TEMPORARY MEMORY
MEM3 =$0102 ;TEMPORARY MEMORY

.ORG $F800
.BYTE $92,$51,$30,$30,$28,$25,$26,$26,$6E
.ORG $F810
.BYTE $12,$12,$96,$99,$95,$B3,$43,$22,$12
.ORG $F820
.BYTE $0F,$05,$03,$0B,$05,$03,$09,$05,$03

.ORG $F000
START
 LDA #$ff ;INITIALISE DDRA
 STA DDRA ;AND DDRB AS
 STA DDRB ;OUTPUT REGISTERS
L1 LDX #$08 ;LOAD REG.X WITH SEQUENCE VALUE
L2 LDA $F800,X ;LOAD ACC. WITH CODE1 INDEX X
 STA IOPA ;STORE IN I/O PORT PA
 LDA $F810,X ;LOAD ACC. WITH CODE2 INDEX X
 STA IOPB ;STORE IN I/O PORT PB
 JSR TIMER ;CALL DELAY
 DEX ;DECREMENT REG.X
 BPL L2 ;IF PLUS REPEAT
 JMP L1 ;BEGIN AGAIN

;TIMER SUBROUTINE

TIMER LDA $F820,X ;LOAD ACC. WITH TIMING INDEX X
 STA MEM1 ;STORE IN TEMPORARY MEMORY 1
 JSR INTVL ;CALL 1.00-SEC INTERVAL
L3 DEC MEM1 ;DECREMENT MEMORY 1
 BPL L3 ;IF PLUS REPEAT
 RTS ;RETURN FROM SUBROUTINE

;1.00-SEC INTERVAL SUBROUTINE

INTVL LDY #$14 ;LOAD REG. Y WITH 20
L4 LDA #$50 ;INITIALISE VIA TIMER
 STA T1CL ;COUNTER LOW & HIGH
 LDA #$C3 ;TO OBTAIN A VALUE
 STA T1CH ;OF 0.05 SEC.
TIMUT LDA IFR ;CHECK FOR
 AND #$20 ;END OF
 BEQ TIMUT;COUNT
 DEY ;DECREMENT REG. Y TO COUNTDOWN
 BNE L4 ;IF NOT REPEAT
 RTS ;RETURN FROM SUBROUTINE

.ORG $FFFC ;RESET VECTOR
.BYTE $00,$F0
.END


Two things that I did were to indent the lines without labels so that the OP codes are not in the first column. I also added a space after the label names CODE1 and CODE2. It did not like the equals sign (=) next to the label name.

Give this one a try....

Daryl


Top
 Profile  
Reply with quote  
 Post subject: "ZERO ERROR ASSEMBLY"
PostPosted: Tue May 16, 2006 8:12 pm 
Offline

Joined: Tue Oct 11, 2005 4:59 am
Posts: 15
Thank you Daryl. I can now assemble with zero error. I think a little smile is not a bad idea. Now the next step is to load the generated object file on to the EPROM (I have 2716 and 2732 Eproms). Remember I once mentioned that I have an EXPRO-80 Eprom Programmer. Can I have a step by step procedure please. The PC82 software has been installed and running but there is no README file for a green horn like me to rely upon for a tutorial.
Thanks once again.

_________________
folorunsoa


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Tue May 16, 2006 9:04 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1748
Location: Sacramento, CA
I am not familiar with your programmer or the software.

The usual steps involve installing the part, verifying its blank, loading the source file, then programming and verifying the burn.

There should be some choices for loading the source file. Binary and Intel HEX are the two I have used.

If you use binary, then your object file should work. One note on that. You will need to get the assembler to fill-in the unused locations so that the object file is the same size as your address map. in other words, if you write your code to start at $C000 and you need the vectors at $FFFA-FFFF, then your object file should end up being 16,384 bytes.

I do not know the TASM assembler, so you may need to read the help resources in order to set the proper flags or add the right macros.

Good luck!

Daryl


Top
 Profile  
Reply with quote  
PostPosted: Tue May 16, 2006 10:04 pm 
Offline

Joined: Fri Aug 30, 2002 2:05 pm
Posts: 347
Location: UK
Quote:
Can I have a step by step procedure please. The PC82 software has been installed and running but there is no README file for a green horn like me to rely upon for a tutorial.


Glad to see the software worked.

The manual is available for download from here ..

http://www.danbbs.dk/~rmadrm/expro_m.pdf

.. but the programmer software is fairly simple. Use the cursor keys to highlight menus or menuitems and the enter key to select them. ESC will get you back to the main screen.

Lee.


Top
 Profile  
Reply with quote  
PostPosted: Sun Jun 25, 2006 1:44 am 
Offline

Joined: Tue Oct 11, 2005 4:59 am
Posts: 15
Dear Forum Members,

The original object file after a successful assembly exercise is in HEX format. Will the EPROM work if it is programmed using the HEX format? Or is it a MUST that the HEX format be converted to the BINARY format before programming the EPROM?

Thank you.

_________________
folorunsoa


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun Jun 25, 2006 2:44 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8545
Location: Southern California
Intel Hex format is plain text, so you can even write, view, and edit it in a text editor (although it's certainly not practical to write it by hand). Each line starts with a colon (":"), then has a pair of digits telling the record length (ie, how much program data) in that line, then four digits telling the beginning address of the data in that line, a pair of digits telling the data type, then the data itself (usually $10 or $20 pairs of hex digits), and then two digits of checksum. The last line of this text file has no program data but only tells the programmer that the transfer is finished and it should not expect any more data before it begins programming. These extra bytes don't go into the EPROM at all. They're info for the device programmer, not the target computer that uses the EPROM. All the bytes in the text of the Hex file will be in the range of $30 to $3A and $41 to $46, because it's just ASCII, hex digits and the colon (":"). As you can see, that leaves out an awful lot of op codes and operand bytes you'll want. So yes, the EPROM programmer must convert to binary, using the housekeeping bytes to program the binary data into the right locations, check for transfer errors, and know when the end of the data has been reached.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 40 posts ]  Go to page Previous  1, 2, 3

All times are UTC


Who is online

Users browsing this forum: No registered users and 53 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: