Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Assembly Language > Newbie question
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 4904 of 5181
Post > Topic >>

Newbie question

by "Tim" <tim@[EMAIL PROTECTED] > Mar 9, 2008 at 11:40 PM

This is a multi-part message in MIME format.

------=_NextPart_000_000E_01C8823F.5A6B2160
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

Apologies in advance for the newbie question. Have just written an =
assembler for an old MCU (Mitsubi**** M50734) which is based on the 6502 =
instruction set. It outputs an object file without any problems and I'm =
just starting to write the code to generate the listing output file, but =
am a bit stuck. Could anyone point me in the right direction as to the =
format of a listing file that is ready to download into an EPROM please =
? From what I've ready it looks like the object code with some sort of =
checksum after so many bytes.=20

Any pointers gratefully received.

As an example, my object files resemble the following :

* M50745 ASSEMBLER V.1.0.A *                                     P. 001

E  SEQ.  LOC.  OBJ..     ....*....1....*....2....*....SOURCE =
STATEMENT....5....*.
      1                  ;
      2                       .PAGE
      3                  =
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      4                  ;;;;;;;;;;;     SERIAL OUTPUT           =
;;;;;;;;;;;;;;;;;;;;
      5                  =
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
      6                  ;
      7                  P2P3FR    =3D $ED=20
      8                  P3D       =3D $EF
      9                  SIOR      =3D $E8
     10                  ;
     11                           *=3D $E080
     12                  ;
     13                  TSO:
     14  E080 2FED               SEB 1,P2P3FR    ; SCLK,SIO MODE
     15  E082 2FEF               SEB 1,P3D       ; SCLK OUT MODE
     16  E084 4FEF               SEB 2,P3D       ; So MODE
     17                  ;
     18  E086 A955               LDA #$55
     19  E088 85E8               STA SIOR
     20                  ;
     21  E08A EA                 NOP             ; OUTPUT START
     22  E08B EA                 NOP             ; DELAY FOR SIOR EMPTY
     23                  ;
     24  E08C A9AA               LDA  #$AA
     25  E08E 85E8               STA SIOR
     26                  ;
     27  E090 EA                 NOP
     28  E091 EA                 NOP
     29                  ;
     30  E092 3FED               CLB 1,P2P3FR
     31                  ;
     32  E094 60   RTS
     33                  ;
     34                  ;

ERROR COUNT  0000
TOTAL LINE   0034 LINES
COMMENT LINE 0015 LINES
OBJECT SIZE  0021 BYTES

Thanks,
Tim.
------=_NextPart_000_000E_01C8823F.5A6B2160
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.6000.16608" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DCalibri>Hi,</FONT></DIV>
<DIV><FONT face=3DCalibri></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCalibri>Apologies in advance for the newbie question. =
Have just=20
written an assembler for an old MCU (Mitsubi**** M50734) which =
is&nbsp;based on=20
the 6502 instruction set. It outputs an object&nbsp;file without any =
problems=20
and I'm&nbsp;just starting to write the code to generate the listing =
output=20
file, but am a bit stuck. Could anyone point me in the right direction =
as to the=20
format of a listing file that is ready to download into an EPROM please =
? From=20
what I've ready it looks like the object code with some sort of checksum =
after=20
so many bytes. </FONT></DIV>
<DIV><FONT face=3DCalibri></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCalibri>Any pointers gratefully received.</FONT></DIV>
<DIV><FONT face=3DCalibri></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCalibri>As an example,&nbsp;my object&nbsp;files =
resemble the=20
following :<BR></FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D1>* M50745 ASSEMBLER V.1.0.A=20
*&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
P. 001</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D1></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" size=3D1>E&nbsp; SEQ.&nbsp; LOC.&nbsp;=20
OBJ..&nbsp;&nbsp;&nbsp;&nbsp; ....*....1....*....2....*....SOURCE=20
STATEMENT....5....*.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1&nbsp; &nbsp; =
&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2&nbsp; &nbsp; &nbsp;=20
&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; .PAGE<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3&nbsp; =
&nbsp; &nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;<BR>&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;=20
4&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
;;;;;;;;;;;&nbsp;&nbsp;&nbsp;&nbsp; SERIAL=20
OUTPUT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp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;&nbsp;&nbsp; =20
;<BR>&nbsp;&nbsp;&nbsp;&nbsp; 34&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ;</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D1></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" size=3D1>ERROR COUNT&nbsp; 0000<BR>TOTAL =

LINE&nbsp;&nbsp; 0034 LINES<BR>COMMENT LINE 0015 LINES<BR>OBJECT =
SIZE&nbsp; 0021=20
BYTES</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D1></FONT>&nbsp;</DIV>
<DIV><FONT face=3DCalibri>Thanks,</FONT></DIV>
<DIV><FONT face=3DCalibri>Tim.</FONT></DIV></BODY></HTML>

------=_NextPart_000_000E_01C8823F.5A6B2160--
 




 3 Posts in Topic:
Newbie question
"Tim" <tim@[  2008-03-09 23:40:03 
Re: Newbie question
"Wolfgang Kern"  2008-03-10 14:44:21 
Re: Newbie question
Herbert Kleebauer <kle  2008-03-10 15:35:22 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Nov 21 14:30:56 CST 2008.