burning vs cooking
some burning vs cooking with assembler

Most if not all of computers and micro-controller use binary language, 1 or 0. Human count with decimal, sometime with fingers. It is near more comfortable to do binary with hexadecimal using 2 hex digit 0 to F which represent 2 four binary 1 or 0 digits.
Another representation is decimal binary coded BCD.
Assembling tools have been done and many of can be find on web.
asl a very nice one of them, fit my needs, and have a gnu license asl gnu license
Once you have compiled asl,(use gcc on linux), then asl tree contain some tests programs. I've short that one.

-----------
        cpu     8048

        add     a,r2
        add     a,@r1
        add     a,#21h

        addc    a,r3
        addc    a,@r1
        addc    a,#21h
.......
        in      a,p0
        outl    p0,a

        sel     an0
        sel     an1
        rad
---------------------

There you notice mnemonics (from Greece Divinity mnemosis that mean to remember (same as contrary 'never forget')). On the following listing (t48.list) you notice other mnemonics on right and on left address like 13/ A : 53 21 anl a,#21h that mean that mnemonic "adc a,0xa5" has hexadecimal "code" CE A5 for 8048 cpu. Have a look on 8048 manual/docs at hand, you find that value, for that instruction, and in decimal, then you can also do it, one after one instruction. $ asl t_48.asm -l

----------------------------------------
 AS V1.42 Beta [Bld 51] - source file t_48.asm - page 1 - 10/16/2006 23:15:19


       1/       0 :                             cpu     8048
       2/       0 :                     
       3/       0 : 6A                          add     a,r2
       4/       1 : 61                          add     a,@r1
       5/       2 : 03 21                       add     a,#21h
       6/       4 :                     
       7/       4 : 7B                          addc    a,r3
       8/       5 : 71                          addc    a,@r1
       9/       6 : 13 21                       addc    a,#21h
      10/       8 :                     
      11/       8 : 5C                          anl     a,r4
      12/       9 : 51                          anl     a,@r1
      13/       A : 53 21                       anl     a,#21h
      14/       C : 98 12                       anl     bus,#12h
......etc
     177/      88 : 80                          rad
     178/      89 :                     
macro assembler 1.42 Beta [Bld 51]
(i386-unknown-linux)
(C) 1992,2006 Alfred Arnold
68RS08-Generator (C) 2006 Andreas Bolsch
Mitsubishi M16C-Generator also (C) 1999 RMS
XILINX KCPSM(Picoblaze)-Generator (C) 2003 Andreas Wassatsch
TMS320C2x-Generator (C) 1994/96 Thomas Sailer
TMS320C5x-Generator (C) 1995/96 Thomas Sailer
0.13 seconds assembly time
    179 lines source file
     1 pass
      0 errors
      0 warnings
--------------------------------------------------------- 

then once your data is ready, you need to put it in eprom or eeprom, So the prog result have to be change in hexadecimal values, (here intel hex format (for file format look s3 dataman manual it is well explained) that understand the e(e)prom programmers.

------------------------------------------
:10000000CEA58EDD8E12FD8E128F88898A8B8C8D07
:10001000ED4AED5AED6AED7AC6A586DD8612FD86BB
:10002000128780818283848509192939DD09DD19C8
:10003000DD29DD39FD09FD19FD29FD39E6A5A6DD1E
.................short..............
:1005A00061626364656667680000FF0000FFFF34F6
:0105B0001238
:00000001FF
-------------------------

Once the program eprom embeded, then you can use it for your project.
t48.asm from asl suite
t48.hex from p2hex
t48.list listing from asl compilation
testz80.asm mnemonic assembler program
testz80.hex tpasm hex listing
testz80.lst tpasm listing

There is other macro assemblers for dos, windows, linux, you can search on web for them.

© copyright Graflad Corp. 2004, 2005, 2006, 2007

disclaim