Write only programming

From: Andreas Freiherr <Andreas.Freiherr_at_Vishay.com>
Date: Mon Mar 4 15:16:56 2002

Tony Duell wrote:
>
> > > > If you write machine code rather than assembly language (I've
> > > > done this a
> > > > few time...) then again there's no way to include comments...
> > > Sure there is -- just don't run them ;)
> >
> > B4 02 B2 44 EB 11 54 68 69 73 20 69 73 29 61 20
> > 63 6F 6D 6D 65 6E 74 CD 21
> >
> > Or for the disassembly challenged:
> > MOV AH, 2
> > MOV DL, 'D'
> > JMP over
> > DB 'This is a comment'
> > over: INT 21h
>
> And you seriously think I've got enough space to do that in one of my
> firmware ROMs ?????
>
> -tony

Nah, do it this way:

      MOV AH, 2
      MOV DL, 'D'
back: DB 'This is a comment'
      ORG back
      INT 21h

Saves a lot of space in your ROM by keeping the comment in the source,
where it belongs. We're still not too serious about all this, are we?
;-) So I can add that you may need to keep your comments shorter near
the end of the object code?

--
Andreas Freiherr
Vishay Semiconductor GmbH, Heilbronn, Germany
http://www.vishay.com
Received on Mon Mar 04 2002 - 15:16:56 GMT

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:35:09 BST