Author Topic: how can i assemble .asm file in linux for my 8051?  (Read 2694 times)

0 Members and 1 Guest are viewing this topic.

Offline rookie of mcuTopic starter

  • Newbie
  • Posts: 4
  • Country: cn
how can i assemble .asm file in linux for my 8051?
« on: August 25, 2023, 02:48:14 am »
   hello everyone , I am a newbee of the mcu.  I am learning assemble not C , because I think the former is Intuitive and clean .
   I used to compile my program with Keil under Windows , recently I try SDCC and ASXXXX under Linux  , but the SFR address of SDCC isn't same with my 8051!!! :'(
  When I checked list of AS8051 , I found it's same with mine. 
   But when I saw the makefile , I felt asxxxx can't compile .asm but .c !?  Am I right ??

 

 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1545
  • Country: au
Re: how can i assemble .asm file in linux for my 8051?
« Reply #1 on: August 25, 2023, 03:28:42 am »
   hello everyone , I am a newbee of the mcu.  I am learning assemble not C , because I think the former is Intuitive and clean .
   I used to compile my program with Keil under Windows , recently I try SDCC and ASXXXX under Linux  , but the SFR address of SDCC isn't same with my 8051!!! :'(
SFR file info normally comes form an include file for your variant.
Whilst some assembler have a bare-bone 8051 default SFR set inbuilt, but it is rare to not use the include files.


  When I checked list of AS8051 , I found it's same with mine. 
   But when I saw the makefile , I felt asxxxx can't compile .asm but .c !?  Am I right ??

The AS8051 page says this ? Perhaps you are getting confused with the source code for the assembler itself, called as8051.c ?

Quote
AS8051  Assembler (and pretty printer) for 8051.  This program is a simple 8051 assembler.
AS8051 provides: a program called as8051 which transform a 8051 assembly file into a hex format file or a binary file;
 
The following users thanked this post: rookie of mcu

Offline rookie of mcuTopic starter

  • Newbie
  • Posts: 4
  • Country: cn
Re: how can i assemble .asm file in linux for my 8051?
« Reply #2 on: August 25, 2023, 03:47:17 am »
I really need to make ASXXXX's makefile clear! Maybe I will reply tomorrow
And it's my first time to insert code!
Code: [Select]
.PHONY: all clean prep

all: as1802 \
as2650 \
as430 \
as6100 \
as61860 \
as6500 \
as6800 \
as6801 \
as6804 \
as6805 \
as6808 \
as6809 \
as6811 \
as6812 \
as6816 \
as740 \
as78k0 \
as78k0s \
as8008 \
as8008s \
as8048 \
as8051 \
as8085 \
as89lp \
as8x300 \
as8xcxxx \
asavr \
asez80 \
asf2mc8 \
asf8 \
asgb \
ash8 \
asm8c \
aspic \
asrab \
asscmp \
ascheck \
asst6 \
asst7 \
asst8 \
asz8 \
asz80 \
asz280 \
aslink \
asxscn \
asxcnv \
s19os9

clean:
rm -f $(SRCASX)*.o
rm -f $(SRCLNK)*.o
rm -f $(SRCMISC)*.o
rm -f $(SRCS19OS9)*.o
rm -f $(S19OS9)*.o
rm -f $(SRC1802)*.o
rm -f $(SRC2650)*.o
rm -f $(SRC430)*.o
rm -f $(SRC6100)*.o
rm -f $(SRC61860)*.o
rm -f $(SRC6500)*.o
rm -f $(SRC6800)*.o
rm -f $(SRC6801)*.o
rm -f $(SRC6804)*.o
rm -f $(SRC6805)*.o
rm -f $(SRC6808)*.o
rm -f $(SRC6809)*.o
rm -f $(SRC6811)*.o
rm -f $(SRC6812)*.o
rm -f $(SRC6816)*.o
rm -f $(SRC740)*.o
rm -f $(SRC78K0)*.o
rm -f $(SRC78K0S)*.o
rm -f $(SRC8008)*.o
rm -f $(SRC8008S)*.o
rm -f $(SRC8048)*.o
rm -f $(SRC8051)*.o
rm -f $(SRC8085)*.o
rm -f $(SRC89LP)*.o
rm -f $(SRC8X300)*.o
rm -f $(SRC8XCXXX)*.o
rm -f $(SRCAVR)*.o
rm -f $(SRCCHECK)*.o
rm -f $(SRCEZ80)*.o
rm -f $(SRCF2MC8)*.o
rm -f $(SRCF8)*.o
rm -f $(SRCGB)*.o
rm -f $(SRCH8)*.o
rm -f $(SRCM8C)*.o
rm -f $(SRCPIC)*.o
rm -f $(SRCRAB)*.o
rm -f $(SRCSCMP)*.o
rm -f $(SRCST6)*.o
rm -f $(SRCST7)*.o
rm -f $(SRCST8)*.o
rm -f $(SRCZ8)*.o
rm -f $(SRCZ80)*.o
rm -f $(SRCZ280)*.o
rm -f as1802
rm -f as2650
rm -f as430
rm -f as6100
rm -f as61860
rm -f as6500
rm -f as6800
rm -f as6801
rm -f as6804
rm -f as6805
rm -f as6808
rm -f as6809
rm -f as6811
rm -f as6812
rm -f as6816
rm -f as740
rm -f as78k0
rm -f as78k0s
rm -f as8008
rm -f as8008s
rm -f as8048
rm -f as8051
rm -f as8085
rm -f as89lp
rm -f as8x300
rm -f as8xcxxx
rm -f asavr
rm -f asez80
rm -f asf2mc8
rm -f asf8
rm -f asgb
rm -f ash8
rm -f asm8c
rm -f aspic
rm -f asrab
rm -f asscmp
rm -f ascheck
rm -f asst6
rm -f asst7
rm -f asst8
rm -f asz8
rm -f asz80
rm -f asz280
rm -f aslink
rm -f asxscn
rm -f asxcnv
rm -f s19os9
rm -f $(DSTEXE)*

prep:
rm -f $(SRCASX)*.o
rm -f $(SRCLNK)*.o
rm -f $(SRCMISC)*.o
rm -f $(SRCS19OS9)*.o
rm -f $(SRC1802)*.o
rm -f $(SRC2650)*.o
rm -f $(SRC430)*.o
rm -f $(SRC6100)*.o
rm -f $(SRC61860)*.o
rm -f $(SRC6500)*.o
rm -f $(SRC6800)*.o
rm -f $(SRC6801)*.o
rm -f $(SRC6804)*.o
rm -f $(SRC6805)*.o
rm -f $(SRC6808)*.o
rm -f $(SRC6809)*.o
rm -f $(SRC6811)*.o
rm -f $(SRC6812)*.o
rm -f $(SRC6816)*.o
rm -f $(SRC740)*.o
rm -f $(SRC78K0)*.o
rm -f $(SRC78K0S)*.o
rm -f $(SRC8008)*.o
rm -f $(SRC8008S)*.o
rm -f $(SRC8048)*.o
rm -f $(SRC8051)*.o
rm -f $(SRC8085)*.o
rm -f $(SRC89LP)*.o
rm -f $(SRC8X300)*.o
rm -f $(SRC8XCXXX)*.o
rm -f $(SRCAVR)*.o
rm -f $(SRCCHECK)*.o
rm -f $(SRCEZ80)*.o
rm -f $(SRCF2MC8)*.o
rm -f $(SRCF8)*.o
rm -f $(SRCGB)*.o
rm -f $(SRCH8)*.o
rm -f $(SRCM8C)*.o
rm -f $(SRCPIC)*.o
rm -f $(SRCRAB)*.o
rm -f $(SRCSCMP)*.o
rm -f $(SRCST6)*.o
rm -f $(SRCST7)*.o
rm -f $(SRCST8)*.o
rm -f $(SRCZ8)*.o
rm -f $(SRCZ80)*.o
rm -f $(SRCZ280)*.o
rm -f as1802
rm -f as2650
rm -f as430
rm -f as6100
rm -f as61860
rm -f as6500
rm -f as6800
rm -f as6801
rm -f as6804
rm -f as6805
rm -f as6808
rm -f as6809
rm -f as6811
rm -f as6812
rm -f as6816
rm -f as740
rm -f as78k0
rm -f as78k0s
rm -f as8008
rm -f as8008s
rm -f as8048
rm -f as8051
rm -f as8085
rm -f as89lp
rm -f as8x300
rm -f as8xcxxx
rm -f asavr
rm -f asez80
rm -f asf2mc8
rm -f asf8
rm -f asgb
rm -f ash8
rm -f asm8c
rm -f aspic
rm -f asrab
rm -f asscmp
rm -f ascheck
rm -f asst6
rm -f asst7
rm -f asst8
rm -f asz8
rm -f asz80
rm -f asz280
rm -f aslink
rm -f asxscn
rm -f asxcnv
rm -f s19os9


CC= gcc
CCOPT= -O3
CCFLAGS= -Wall -funsigned-char $(CCOPT)

LD= gcc
LDOPT=
LDFLAGS= -Wall $(LDOPT)

#  Set ASXBAS relative to this make file.

ASXBAS:= ../../../
ASXEXE:= ../

SRCASX:= $(ASXBAS)asxxsrc/
SRCLNK:= $(ASXBAS)linksrc/
SRCMISC:= $(ASXBAS)asxxmisc/
SRCS19OS9:= $(ASXBAS)s19os9/
DSTEXE:= $(ASXBAS)asxmak/linux/exe/

SRC1802= $(ASXBAS)as1802/
SRC2650= $(ASXBAS)as2650/
SRC430= $(ASXBAS)as430/
SRC6100= $(ASXBAS)as6100/
SRC61860= $(ASXBAS)as61860/
SRC6500= $(ASXBAS)as6500/
SRC6800= $(ASXBAS)as6800/
SRC6801= $(ASXBAS)as6801/
SRC6804= $(ASXBAS)as6804/
SRC6805= $(ASXBAS)as6805/
SRC6808= $(ASXBAS)as6808/
SRC6809= $(ASXBAS)as6809/
SRC6811= $(ASXBAS)as6811/
SRC6812= $(ASXBAS)as6812/
SRC6816= $(ASXBAS)as6816/
SRC740= $(ASXBAS)as740/
SRC78K0= $(ASXBAS)as78k0/
SRC78K0S= $(ASXBAS)as78k0s/
SRC8008= $(ASXBAS)as8008/
SRC8008S= $(ASXBAS)as8008s/
SRC8048= $(ASXBAS)as8048/
SRC8051= $(ASXBAS)as8051/
SRC8085= $(ASXBAS)as8085/
SRC89LP= $(ASXBAS)as89lp/
SRC8X300= $(ASXBAS)as8x300/
SRC8XCXXX= $(ASXBAS)as8xcxxx/
SRCAVR= $(ASXBAS)asavr/
SRCCHECK= $(ASXBAS)ascheck/
SRCEZ80= $(ASXBAS)asez80/
SRCF2MC8= $(ASXBAS)asf2mc8/
SRCF8= $(ASXBAS)asf8/
SRCGB= $(ASXBAS)asgb/
SRCH8= $(ASXBAS)ash8/
SRCM8C= $(ASXBAS)asm8c/
SRCPIC= $(ASXBAS)aspic/
SRCRAB= $(ASXBAS)asrab/
SRCSCMP= $(ASXBAS)asscmp/
SRCST6= $(ASXBAS)asst6/
SRCST7= $(ASXBAS)asst7/
SRCST8= $(ASXBAS)asst8/
SRCZ8= $(ASXBAS)asz8/
SRCZ80= $(ASXBAS)asz80/
SRCZ280= $(ASXBAS)asz280/

.SUFFIXES: .c .o

%.o: %.c
$(CC) $(CCFLAGS) -I$(SRCMISC) -I$(SRCASX) -c $< -o $@


ASXX = asdata.o asexpr.o aslex.o aslist.o \
asmain.o asmcro.o asout.o assubr.o \
assym.o asdbg.o

ASXXSRC = $(addprefix $(SRCASX),$(ASXX))

$(ASXXSRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h


####################################################################
# AS1802
####################################################################

AS1802 = 1802mch.o 1802pst.o

AS1802SRC = $(addprefix $(SRC1802),$(AS1802))

$(AS1802SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRC1802)1802.h

as1802: $(ASXXSRC) $(AS1802SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(AS1802SRC) -o as1802
cp as1802 $(DSTEXE)as1802
strip $(DSTEXE)as1802
chmod 755 $(DSTEXE)as1802


####################################################################
# AS2650
####################################################################

AS2650 = s26adr.o s26mch.o s26pst.o

AS2650SRC = $(addprefix $(SRC2650),$(AS2650))

$(AS2650SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRC2650)s2650.h

as2650: $(ASXXSRC) $(AS2650SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(AS2650SRC) -o as2650
cp as2650 $(DSTEXE)as2650
strip $(DSTEXE)as2650
chmod 755 $(DSTEXE)as2650


####################################################################
# AS430
####################################################################

AS430 = m430adr.o m430mch.o m430pst.o

AS430SRC = $(addprefix $(SRC430),$(AS430))

$(AS430SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRC430)m430.h

as430: $(ASXXSRC) $(AS430SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(AS430SRC) -o as430
cp as430 $(DSTEXE)as430
strip $(DSTEXE)as430
chmod 755 $(DSTEXE)as430

####################################################################
# AS6100
####################################################################

AS6100 = i61adr.o i61mch.o i61pst.o

AS6100SRC = $(addprefix $(SRC6100),$(AS6100))

$(AS6100SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRC6100)i6100.h

as6100: $(ASXXSRC) $(AS6100SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(AS6100SRC) -o as6100
cp as6100 $(DSTEXE)as6100
strip $(DSTEXE)as6100
chmod 755 $(DSTEXE)as6100

####################################################################
# AS61860
####################################################################

AS61860 = s6186adr.o s6186mch.o s6186pst.o

AS61860SRC = $(addprefix $(SRC61860),$(AS61860))

$(AS61860SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRC61860)s61860.h

as61860: $(ASXXSRC) $(AS61860SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(AS61860SRC) -o as61860
cp as61860 $(DSTEXE)as61860
strip $(DSTEXE)as61860
chmod 755 $(DSTEXE)as61860


####################################################################
# AS6500
####################################################################

AS6500 = r65adr.o r65mch.o r65pst.o

AS6500SRC = $(addprefix $(SRC6500),$(AS6500))

$(AS6500SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRC6500)r6500.h

as6500: $(ASXXSRC) $(AS6500SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(AS6500SRC) -o as6500
cp as6500 $(DSTEXE)as6500
strip $(DSTEXE)as6500
chmod 755 $(DSTEXE)as6500


####################################################################
# AS6800
####################################################################

AS6800 = m00adr.o m00mch.o m00pst.o

AS6800SRC = $(addprefix $(SRC6800),$(AS6800))

$(AS6800SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRC6800)m6800.h

as6800: $(ASXXSRC) $(AS6800SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(AS6800SRC) -o as6800
cp as6800 $(DSTEXE)as6800
strip $(DSTEXE)as6800
chmod 755 $(DSTEXE)as6800


####################################################################
# AS6801
####################################################################

AS6801 = m01adr.o m01mch.o m01pst.o

AS6801SRC = $(addprefix $(SRC6801),$(AS6801))

$(AS6801SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRC6801)m6801.h

as6801: $(ASXXSRC) $(AS6801SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(AS6801SRC) -o as6801
cp as6801 $(DSTEXE)as6801
strip $(DSTEXE)as6801
chmod 755 $(DSTEXE)as6801


####################################################################
# AS6804
####################################################################

AS6804 = m04adr.o m04mch.o m04pst.o

AS6804SRC = $(addprefix $(SRC6804),$(AS6804))

$(AS6804SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRC6804)m6804.h

as6804: $(ASXXSRC) $(AS6804SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(AS6804SRC) -o as6804
cp as6804 $(DSTEXE)as6804
strip $(DSTEXE)as6804
chmod 755 $(DSTEXE)as6804


####################################################################
# AS6805
####################################################################

AS6805 = m05adr.o m05mch.o m05pst.o

AS6805SRC = $(addprefix $(SRC6805),$(AS6805))

$(AS6805SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRC6805)m6805.h

as6805: $(ASXXSRC) $(AS6805SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(AS6805SRC) -o as6805
cp as6805 $(DSTEXE)as6805
strip $(DSTEXE)as6805
chmod 755 $(DSTEXE)as6805


####################################################################
# AS6808
####################################################################

AS6808 = m08adr.o m08mch.o m08pst.o

AS6808SRC = $(addprefix $(SRC6808),$(AS6808))

$(AS6808SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRC6808)m6808.h

as6808: $(ASXXSRC) $(AS6808SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(AS6808SRC) -o as6808
cp as6808 $(DSTEXE)as6808
strip $(DSTEXE)as6808
chmod 755 $(DSTEXE)as6808


####################################################################
# AS6809
####################################################################

AS6809 = m09adr.o m09mch.o m09pst.o

AS6809SRC = $(addprefix $(SRC6809),$(AS6809))

$(AS6809SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRC6809)m6809.h

as6809: $(ASXXSRC) $(AS6809SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(AS6809SRC) -o as6809
cp as6809 $(DSTEXE)as6809
strip $(DSTEXE)as6809
chmod 755 $(DSTEXE)as6809


####################################################################
# AS6811
####################################################################

AS6811 = m11adr.o m11mch.o m11pst.o

AS6811SRC = $(addprefix $(SRC6811),$(AS6811))

$(AS6811SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRC6811)m6811.h

as6811: $(ASXXSRC) $(AS6811SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(AS6811SRC) -o as6811
cp as6811 $(DSTEXE)as6811
strip $(DSTEXE)as6811
chmod 755 $(DSTEXE)as6811


####################################################################
# AS6812
####################################################################

AS6812 = m12adr.o m12mch.o m12pst.o

AS6812SRC = $(addprefix $(SRC6812),$(AS6812))

$(AS6812SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRC6812)m6812.h

as6812: $(ASXXSRC) $(AS6812SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(AS6812SRC) -o as6812
cp as6812 $(DSTEXE)as6812
strip $(DSTEXE)as6812
chmod 755 $(DSTEXE)as6812


####################################################################
# AS6816
####################################################################

AS6816 = m16adr.o m16mch.o m16pst.o

AS6816SRC = $(addprefix $(SRC6816),$(AS6816))

$(AS6816SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRC6816)m6816.h

as6816: $(ASXXSRC) $(AS6816SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(AS6816SRC) -o as6816
cp as6816 $(DSTEXE)as6816
strip $(DSTEXE)as6816
chmod 755 $(DSTEXE)as6816


####################################################################
# AS740
####################################################################

AS740 = m74adr.o m74mch.o m74pst.o

AS740SRC = $(addprefix $(SRC740),$(AS740))

$(AS740SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRC740)m740.h

as740: $(ASXXSRC) $(AS740SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(AS740SRC) -o as740
cp as740 $(DSTEXE)as740
strip $(DSTEXE)as740
chmod 755 $(DSTEXE)as740


####################################################################
# AS78K0
####################################################################

AS78K0 = r78k0adr.o r78k0mch.o r78k0pst.o

AS78K0SRC = $(addprefix $(SRC78K0),$(AS78K0))

$(AS78K0SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRC78K0)r78k0.h

as78k0: $(ASXXSRC) $(AS78K0SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(AS78K0SRC) -o as78k0
cp as78k0 $(DSTEXE)as78k0
strip $(DSTEXE)as78k0
chmod 755 $(DSTEXE)as78k0


####################################################################
# AS78K0S
####################################################################

AS78K0S = r78kadr.o r78kmch.o r78kpst.o

AS78KSRC = $(addprefix $(SRC78K0S),$(AS78K0S))

$(AS78KSRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRC78K0S)r78k0s.h

as78k0s: $(ASXXSRC) $(AS78KSRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(AS78KSRC) -o as78k0s
cp as78k0s $(DSTEXE)as78k0s
strip $(DSTEXE)as78k0s
chmod 755 $(DSTEXE)as78k0s


####################################################################
# AS8008
####################################################################

AS8008 = i08adr.o i08mch.o i08pst.o

AS8008SRC = $(addprefix $(SRC8008),$(AS8008))

$(AS8008SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRC8008)i08.h

as8008: $(ASXXSRC) $(AS8008SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(AS8008SRC) -o as8008
cp as8008 $(DSTEXE)as8008
strip $(DSTEXE)as8008
chmod 755 $(DSTEXE)as8008


####################################################################
# AS8008S
####################################################################

AS8008S = i08sadr.o i08smch.o i08spst.o

AS8008SSRC = $(addprefix $(SRC8008S),$(AS8008S))

$(AS8008SSRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRC8008S)i08s.h

as8008s: $(ASXXSRC) $(AS8008SSRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(AS8008SSRC) -o as8008s
cp as8008s $(DSTEXE)as8008s
strip $(DSTEXE)as8008s
chmod 755 $(DSTEXE)as8008s


####################################################################
# AS8048
####################################################################

AS8048 = i48adr.o i48mch.o i48pst.o

AS8048SRC = $(addprefix $(SRC8048),$(AS8048))

$(AS8048SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRC8048)i8048.h

as8048: $(ASXXSRC) $(AS8048SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(AS8048SRC) -o as8048
cp as8048 $(DSTEXE)as8048
strip $(DSTEXE)as8048
chmod 755 $(DSTEXE)as8048


####################################################################
# AS8051
####################################################################

AS8051 = i51adr.o i51mch.o i51pst.o

AS8051SRC = $(addprefix $(SRC8051),$(AS8051))

$(AS8051SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRC8051)i8051.h

as8051: $(ASXXSRC) $(AS8051SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(AS8051SRC) -o as8051
cp as8051 $(DSTEXE)as8051
strip $(DSTEXE)as8051
chmod 755 $(DSTEXE)as8051


####################################################################
# AS8085
####################################################################

AS8085 = i85mch.o i85pst.o

AS8085SRC = $(addprefix $(SRC8085),$(AS8085))

$(AS8085SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRC8085)i8085.h

as8085: $(ASXXSRC) $(AS8085SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(AS8085SRC) -o as8085
cp as8085 $(DSTEXE)as8085
strip $(DSTEXE)as8085
chmod 755 $(DSTEXE)as8085


####################################################################
# AS89LP
####################################################################

AS89LP = at89adr.o at89mch.o at89pst.o

AS89LPSRC = $(addprefix $(SRC89LP),$(AS89LP))

$(AS89LPSRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRC89LP)at89.h

as89lp: $(ASXXSRC) $(AS89LPSRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(AS89LPSRC) -o as89lp
cp as89lp $(DSTEXE)as89lp
strip $(DSTEXE)as89lp
chmod 755 $(DSTEXE)as89lp


####################################################################
# AS8X300
####################################################################

AS8X300 = s8xadr.o s8xmch.o s8xpst.o

AS8X300SRC = $(addprefix $(SRC8X300),$(AS8X300))

$(AS8X300SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRC8X300)s8x.h

as8x300: $(ASXXSRC) $(AS8X300SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(AS8X300SRC) -o as8x300
cp as8x300 $(DSTEXE)as8x300
strip $(DSTEXE)as8x300
chmod 755 $(DSTEXE)as8x300


####################################################################
# AS8xcxxx
####################################################################

AS8XCXXX = ds8adr.o ds8mch.o ds8pst.o

AS8XCXXXSRC = $(addprefix $(SRC8XCXXX),$(AS8XCXXX))

$(AS8XCXXXSRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRC8XCXXX)ds8.h

as8xcxxx: $(ASXXSRC) $(AS8XCXXXSRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(AS8XCXXXSRC) -o as8xcxxx
cp as8xcxxx $(DSTEXE)as8xcxxx
strip $(DSTEXE)as8xcxxx
chmod 755 $(DSTEXE)as8xcxxx


####################################################################
# ASAVR
####################################################################

ASAVR = avradr.o avrmch.o avrpst.o

ASAVRSRC = $(addprefix $(SRCAVR),$(ASAVR))

$(ASAVRSRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRCAVR)avr.h

asavr: $(ASXXSRC) $(ASAVRSRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(ASAVRSRC) -o asavr
cp asavr $(DSTEXE)asavr
strip $(DSTEXE)asavr
chmod 755 $(DSTEXE)asavr


####################################################################
# ASCHECK
####################################################################

ASCHECK = chkadr.o chkmch.o chkpst.o

ASCHECKSRC = $(addprefix $(SRCCHECK),$(ASCHECK))

$(ASCHECKSRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRCCHECK)chk.h

ascheck: $(ASXXSRC) $(ASCHECKSRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(ASCHECKSRC) -o ascheck
cp ascheck $(DSTEXE)ascheck
strip $(DSTEXE)ascheck
chmod 755 $(DSTEXE)ascheck


####################################################################
# ASEZ80
####################################################################

ASEZ80 = ez80adr.o ez80mch.o ez80pst.o

ASEZ80SRC = $(addprefix $(SRCEZ80),$(ASEZ80))

$(ASEZ80SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRCEZ80)ez80.h

asez80: $(ASXXSRC) $(ASEZ80SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(ASEZ80SRC) -o asez80
cp asez80 $(DSTEXE)asez80
strip $(DSTEXE)asez80
chmod 755 $(DSTEXE)asez80


####################################################################
# ASF2MC8
####################################################################

ASF2MC8 = f2mc8adr.o f2mc8mch.o f2mc8pst.o

ASF2MC8SRC = $(addprefix $(SRCF2MC8),$(ASF2MC8))

$(ASF2MC8SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRCF2MC8)f2mc8.h

asf2mc8: $(ASXXSRC) $(ASF2MC8SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(ASF2MC8SRC) -o asf2mc8
cp asf2mc8 $(DSTEXE)asf2mc8
strip $(DSTEXE)asf2mc8
chmod 755 $(DSTEXE)asf2mc8


####################################################################
# ASF8
####################################################################

ASF8 = f8adr.o f8mch.o f8pst.o

ASF8SRC = $(addprefix $(SRCF8),$(ASF8))

$(ASF8SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRCF8)f8.h

asf8: $(ASXXSRC) $(ASF8SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(ASF8SRC) -o asf8
cp asf8 $(DSTEXE)asf8
strip $(DSTEXE)asf8
chmod 755 $(DSTEXE)asf8


####################################################################
# ASGB
####################################################################

ASGB = gbadr.o gbmch.o gbpst.o

ASGBSRC = $(addprefix $(SRCGB),$(ASGB))

$(ASGBSRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRCGB)gb.h

asgb: $(ASXXSRC) $(ASGBSRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(ASGBSRC) -o asgb
cp asgb $(DSTEXE)asgb
strip $(DSTEXE)asgb
chmod 755 $(DSTEXE)asgb


####################################################################
# ASH8
####################################################################

ASH8 = h8adr.o h8mch.o h8pst.o

ASH8SRC = $(addprefix $(SRCH8),$(ASH8))

$(ASH8SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRCH8)h8.h

ash8: $(ASXXSRC) $(ASH8SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(ASH8SRC) -o ash8
cp ash8 $(DSTEXE)ash8
strip $(DSTEXE)ash8
chmod 755 $(DSTEXE)ash8


####################################################################
# ASM8C
####################################################################

ASM8C = m8cadr.o m8cmch.o m8cpst.o

ASM8CSRC = $(addprefix $(SRCM8C),$(ASM8C))

$(ASM8CSRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRCM8C)m8c.h

asm8c: $(ASXXSRC) $(ASM8CSRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(ASM8CSRC) -o asm8c
cp asm8c $(DSTEXE)asm8c
strip $(DSTEXE)asm8c
chmod 755 $(DSTEXE)asm8c


####################################################################
# ASPIC
####################################################################

ASPIC = picadr.o picmch.o picpst.o

ASPICSRC = $(addprefix $(SRCPIC),$(ASPIC))

$(ASPICSRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRCPIC)pic.h

aspic: $(ASXXSRC) $(ASPICSRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(ASPICSRC) -o aspic
cp aspic $(DSTEXE)aspic
strip $(DSTEXE)aspic
chmod 755 $(DSTEXE)aspic


####################################################################
# ASRAB
####################################################################

ASRAB = rabadr.o rabmch.o rabpst.o

ASRABSRC = $(addprefix $(SRCRAB),$(ASRAB))

$(ASRABSRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRCRAB)rab.h

asrab: $(ASXXSRC) $(ASRABSRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(ASRABSRC) -o asrab
cp asrab $(DSTEXE)asrab
strip $(DSTEXE)asrab
chmod 755 $(DSTEXE)asrab


####################################################################
# ASSCMP
####################################################################

ASSCMP = scmpadr.o scmpmch.o scmppst.o

ASSCMPSRC = $(addprefix $(SRCSCMP),$(ASSCMP))

$(ASSCMPSRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRCSCMP)scmp.h

asscmp: $(ASXXSRC) $(ASSCMPSRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(ASSCMPSRC) -o asscmp
cp asscmp $(DSTEXE)asscmp
strip $(DSTEXE)asscmp
chmod 755 $(DSTEXE)asscmp


####################################################################
# ASST6
####################################################################

ASST6 = st6adr.o st6mch.o st6pst.o

ASST6SRC = $(addprefix $(SRCST6),$(ASST6))

$(ASST6SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRCST6)st6.h

asst6: $(ASXXSRC) $(ASST6SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(ASST6SRC) -o asst6
cp asst6 $(DSTEXE)asst6
strip $(DSTEXE)asst6
chmod 755 $(DSTEXE)asst6


####################################################################
# ASST7
####################################################################

ASST7 = st7adr.o st7mch.o st7pst.o

ASST7SRC = $(addprefix $(SRCST7),$(ASST7))

$(ASST7SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRCST7)st7.h

asst7: $(ASXXSRC) $(ASST7SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(ASST7SRC) -o asst7
cp asst7 $(DSTEXE)asst7
strip $(DSTEXE)asst7
chmod 755 $(DSTEXE)asst7


####################################################################
# ASST8
####################################################################

ASST8 = st8adr.o st8mch.o st8pst.o

ASST8SRC = $(addprefix $(SRCST8),$(ASST8))

$(ASST8SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRCST8)st8.h

asst8: $(ASXXSRC) $(ASST8SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(ASST8SRC) -o asst8
cp asst8 $(DSTEXE)asst8
strip $(DSTEXE)asst8
chmod 755 $(DSTEXE)asst8


####################################################################
# ASZ8
####################################################################

ASZ8 = z8adr.o z8mch.o z8pst.o

ASZ8SRC = $(addprefix $(SRCZ8),$(ASZ8))

$(ASZ8SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRCZ8)z8.h

asz8: $(ASXXSRC) $(ASZ8SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(ASZ8SRC) -o asz8
cp asz8 $(DSTEXE)asz8
strip $(DSTEXE)asz8
chmod 755 $(DSTEXE)asz8


####################################################################
# ASZ80
####################################################################

ASZ80 = z80adr.o z80mch.o z80pst.o

ASZ80SRC = $(addprefix $(SRCZ80),$(ASZ80))

$(ASZ80SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h $(SRCZ80)z80.h

asz80: $(ASXXSRC) $(ASZ80SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(ASZ80SRC) -o asz80
cp asz80 $(DSTEXE)asz80
strip $(DSTEXE)asz80
chmod 755 $(DSTEXE)asz80


####################################################################
# ASZ280
####################################################################

ASZ280 = z280adr.o z280mch.o z280pst.o

ASZ280SRC = $(addprefix $(SRCZ280),$(ASZ280))

$(ASZ280SRC): $(SRCMISC)alloc.h $(SRCASX)asxxxx.h \
$(SRCZ280)z280def.h \
$(SRCZ280)z280ops.h \
$(SRCZ280)z280opcy.h

asz280: $(ASXXSRC) $(ASZ280SRC)
$(LD) $(LDFLAGS) $(ASXXSRC) $(ASZ280SRC) -o asz280
cp asz280 $(DSTEXE)asz280
strip $(DSTEXE)asz280
chmod 755 $(DSTEXE)asz280


####################################################################
# ASLINK
####################################################################

ASLINK = lkmain.o lkhead.o lkarea.o lkbank.o \
lkdata.o lkeval.o lklex.o lklibr.o \
lklist.o lkrloc.o lkrloc3.o lkrloc4.o \
lksym.o lkout.o lknoice.o lksdcdb.o

ASLINKSRC = $(addprefix $(SRCLNK),$(ASLINK))

$(ASLINK): $(SRCMISC)alloc.h $(SRCLNK)aslink.h

aslink: $(ASLINKSRC)
$(LD) $(LDFLAGS) $(ASLINKSRC) -o aslink
cp aslink $(DSTEXE)aslink
strip $(DSTEXE)aslink
chmod 755 $(DSTEXE)aslink


####################################################################
# ASXCNV
####################################################################

$(SRCMISC)asxxconv.o: $(SRCASX)asxxxx.h
asxcnv: $(SRCMISC)asxxconv.o
$(LD) $(LDFLAGS) $(SRCMISC)asxxconv.o -o asxcnv
cp asxcnv $(DSTEXE)asxcnv
strip $(DSTEXE)asxcnv
chmod 755 $(DSTEXE)asxcnv


####################################################################
# ASXSCN
####################################################################

$(SRCMISC)asxxscan.o: $(SRCASX)asxxxx.h
asxscn: $(SRCMISC)asxxscan.o
$(LD) $(LDFLAGS) $(SRCMISC)asxxscan.o -o asxscn
cp asxscn $(DSTEXE)asxscn
strip $(DSTEXE)asxscn
chmod 755 $(DSTEXE)asxscn


####################################################################
# S19OS9
####################################################################

$(SRCS19OS9)s19os9.o: $(SRCASX)asxxxx.h
s19os9: $(SRCS19OS9)s19os9.o
$(LD) $(LDFLAGS) $(SRCS19OS9)s19os9.o -o s19os9
cp s19os9 $(DSTEXE)s19os9
strip $(DSTEXE)s19os9
chmod 755 $(DSTEXE)s19os9


### end ############################################################

 

Offline rookie of mcuTopic starter

  • Newbie
  • Posts: 4
  • Country: cn
Re: how can i assemble .asm file in linux for my 8051?
« Reply #3 on: August 25, 2023, 08:31:50 am »
New process:
   I try SDCC again and it indeed can compile my .asm file , now I am  trying to modify include file of 8051
  Anyone knows the PATH?
 

Offline djnz

  • Regular Contributor
  • *
  • Posts: 179
  • Country: 00
Re: how can i assemble .asm file in linux for my 8051?
« Reply #4 on: August 28, 2023, 02:31:09 am »
May be also take a look at ASEM-51 - http://plit.de/asem-51/home.htm
 
The following users thanked this post: rookie of mcu

Online retiredfeline

  • Frequent Contributor
  • **
  • Posts: 539
  • Country: au
Re: how can i assemble .asm file in linux for my 8051?
« Reply #5 on: August 28, 2023, 03:04:05 am »
SDCC's 8051 assembler is derived from asxxxx so if you have SDCC then you can use its assembler. You can invoke it direct as sdas8051 and running

Code: [Select]
sdas8051 -h
will get you some help for the options. Otherwise look at the asxxxx documention for detailed documentation: https://shop-pdp.net/ashtml/asmblr.htm

Not sure why you want the include files, those are for compiling C. For assembler you would set up some EQUs to define the port addresses. Remember that peripherals outside of the standard set in 8051 will be at addresses specific to that variant.
 
The following users thanked this post: rookie of mcu

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1545
  • Country: au
Re: how can i assemble .asm file in linux for my 8051?
« Reply #6 on: August 28, 2023, 05:01:06 am »
   hello everyone , I am a newbee of the mcu.  I am learning assemble not C , because I think the former is Intuitive and clean .

What target MCU do you use ?

As well as ASEM-51, there is also a windows simulator, useful for learning. Windows only, but it can use SDCC too.   v6.3.3 - 2022-10-21
https://www.rathlev-home.de/mc/mctools-e.html 
 

Offline rookie of mcuTopic starter

  • Newbie
  • Posts: 4
  • Country: cn
Re: how can i assemble .asm file in linux for my 8051?
« Reply #7 on: August 29, 2023, 01:04:01 am »
As an intern , I help to test mcu's function with simple instruction :)
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3365
  • Country: nl
Re: how can i assemble .asm file in linux for my 8051?
« Reply #8 on: August 29, 2023, 06:09:09 am »
Maybe mcu8051ide is worth looking into.
 

Offline tridac

  • Regular Contributor
  • *
  • Posts: 115
  • Country: gb
Re: how can i assemble .asm file in linux for my 8051?
« Reply #9 on: August 31, 2023, 02:50:07 pm »
There should be a facility in Keil C to get an assember source listing as part of the build. Done a fair amount of work with Keil C and 8051 variants, but it's not an architecture I would choose to learn asembler. Typical output from the compiler, asm listing, is pages of impenetrable asm for even the simplest operations. Kudos to Keil for even building a complier for that, producing working code most of the time, but you would do better with a more modern architectiure such as ST Arm STM32 variant, for which there are dozens of cheap boards on Ebay. Then use the linux arm tool chain package and Gnu make. Any 8051 is nightmare to program big projects and best avoided. If you really want 8051, then buy one of the Si Labs evaluation kits, which come with a complete free Keil based toolchain for small or non commercial projects. They redesigned using  a risc core hardware emulation of the 8051 and for an 8 bit micro, are really fast as well...
Test gear restoration, hardware and software projects...
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: how can i assemble .asm file in linux for my 8051?
« Reply #10 on: September 03, 2023, 11:18:49 pm »
Quote
Done a fair amount of work with Keil C and 8051 variants, but it's not an architecture I would choose to learn asembler. Typical output from the compiler, asm listing, is pages of impenetrable asm for even the simplest operations.
I'm going to somewhat disagree.
The 8051 dates from an older time, when architectures were DESIGNED to be programmed in assembler.  The C compiler is large and impenetrable BECAUSE of this - most modern architectures were designed to support modern (HLL) language compilers, but the 8051 was not.


But if you're not trying to duplicate the behaviors of a HLL, these older architectures let an assembly language programmer do a lot of clever and rather fun things.  By comparison, programming an ARM in assembly language is rather tedious, boring, and not very rewarding - it's really hard to do better than a compiler.


Now, it's not clear that learning "clever" assembly language is particularly worthwhile any more.  Your employability might be better served by learning one of more "basically similar" RISC architectures.  Load, operate, store, blah.  But it won't be as much fun, IMO.  And there are a LOT of surviving 8051-architecture devices deeply embedded in special purpose SoCs.  Career-wise, being familiar with "legacy" devices can be valuable, but it can also leave you "stuck."


(The other surviving architecture(s) aimed at assembly users is the 8bit PIC architecture, and I guess the ST-8.  AVR and the Motorola/Freescale/NXP xxxx08 chips are somewhat in-between.)

 

Offline tridac

  • Regular Contributor
  • *
  • Posts: 115
  • Country: gb
Re: how can i assemble .asm file in linux for my 8051?
« Reply #11 on: September 06, 2023, 12:11:30 am »
I was a diehard asm programmer for many years. 6502 bought lunch here and loved it at the time, good mnemonic instruction set and powerful addressing modes, including pre and post indexed indirect. Great for bare metal work, but any 8 bit micro is hard work for larger projects, imho, of course. One 8051 project here split address space into 2 x 32 k segments, 32k for common code and the top, bankswitched across 6 overlays. Like working with hands tied behind the back, too many compromises, like counting machine cycles in interrupt handlers, and increases development costs. End up thinking in asm, not data structures. Now, would do just first stage init, stack, perhaps memtest in asm, then jump to main() for the rest of the setup in C. What modern micros have given us is the freedom to design projects where cpu throughput can be safelly ignored, whereas in the past, that could be a serious limiting factor. Compilers are better as well, sometimes producing just a single line of asm per C statement.

Having said all that, 8051 is ok for learning, and the Si Labs evaluation kits were great value, around $100 when I last used them. You get a cpu board, ready to go, wall wart, full Keil tools, usb / jtag debug adapter, blinky light and other examples and all the docs. The tools are limited, but still enough code space for small projects. Seriously fast as well, up to 50mips from the risc core based 8051 emulation. However, world has moved on, probably far more cheap hardware, online support, free tool chains etc, using something more modern like Cortex M3, or even M0. A far better architecture to learn on...
« Last Edit: September 06, 2023, 12:33:53 am by tridac »
Test gear restoration, hardware and software projects...
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1545
  • Country: au
Re: how can i assemble .asm file in linux for my 8051?
« Reply #12 on: September 06, 2023, 01:14:57 am »
Having said all that, 8051 is ok for learning, and the Si Labs evaluation kits were great value, around $100 when I last used them. You get a cpu board, ready to go, wall wart, full Keil tools, usb / jtag debug adapter, blinky light and other examples and all the docs. The tools are limited, but still enough code space for small projects. Seriously fast as well, up to 50mips from the risc core based 8051 emulation. However, world has moved on, probably far more cheap hardware, online support, free tool chains etc, using something more modern like Cortex M3, or even M0. A far better architecture to learn on...

The 8051 is far from dead, and Silabs have released their 5V EFM8BB5x series, which have good analog and 50MHz (as you say).

Quote
Now, would do just first stage init, stack, perhaps memtest in asm, then jump to main() for the rest of the setup in C. What modern micros have given us is the freedom to design projects where cpu throughput can be safelly ignored, whereas in the past, that could be a serious limiting factor. Compilers are better as well, sometimes producing just a single line of asm per C statement.

Yes, the days of needing to code 100% in ASM are behind us, the earlier Silabs parts started at 2k Flash, but I've not seen anyone release a 2K 8051 for years now.
Most new releases start at 8kF and 1KR, with Nuvoton and STC releasing new parts 

The smallest EFM8BB5x are 8 kB flash 1.28 kB RAM, and the 32 kB flash 2.304 kB parts are still well under $1

Companies like Fortior Tech, release 8051 cores with motor control/gate driver/LDO in one package.
Lumissil have new 8051 parts with ECC Flash and RAM for automotive and parts coming with LIN/LDO included.
WCH and STC have released new parts with FS-USB support.


 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: how can i assemble .asm file in linux for my 8051?
« Reply #13 on: September 06, 2023, 06:53:17 am »
Quote
any 8 bit micro is hard work for larger projects, imho, of course. One 8051 project here split address space into 2 x 32 k segments, 32k for common code and the top, bankswitched across 6 overlays.
I don't disagree.  By the time you start having to deal with special bank-switching schemes, even if they've been added by a vendor, it's time to move to a processor with a native address size of more than the 16bits you see on most 8bit CPUs.  (normally 32bit CPUs.  But a 68000 was only considered a 16bit CPU and handled 24bit addresses, right?)
I don't even like the AVRs with more than 128k (64k words) of memory; they get "messy."


OTOH, what you're calling a "larger project" is VERY large by most 8bit microcontroller project standards.  The 8052 that was probably the most popular version of the 8051 architecture usually had 8k or less of program.
 

Offline DiTBho

  • Super Contributor
  • ***
  • Posts: 3915
  • Country: gb
Re: how can i assemble .asm file in linux for my 8051?
« Reply #14 on: September 06, 2023, 08:34:37 am »
every single CISC-ish design made by intel is messy and pellmell

intel i960 is/was pure RISC, and I found out that the design was not done internally by intel but by an external group working with intel

This explains why the i960 user and programming manuals seem written by simple people instead of those technicians behind { i48, i51, i85, i80, x86, ... } who don't even know what the public could understand from their pellmell designs.

Seriously, comparing books from IDT, Motorola, Hitachi and MIPS to everything made internally by Intel… oh my gosh I really need to clean my eyes with bleach every twelve pages to avoid becoming short-sighted like them.

Comparing (x) vs (y):
            i51 vs hc11 = x86 vs 68k
{ confused, chaotic, pell-mell } vs { clean, tidy, straightforward }

« Last Edit: September 06, 2023, 12:09:15 pm by DiTBho »
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline DiTBho

  • Super Contributor
  • ***
  • Posts: 3915
  • Country: gb
Re: how can i assemble .asm file in linux for my 8051?
« Reply #15 on: September 06, 2023, 08:43:22 am »
Companies like Fortior Tech

+ Dalsemi, with their 390 and 400 serie @ 40Mhz
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline PCB.Wiz

  • Super Contributor
  • ***
  • Posts: 1545
  • Country: au
Re: how can i assemble .asm file in linux for my 8051?
« Reply #16 on: September 06, 2023, 09:06:40 am »
Companies like Fortior Tech

+ Dalsemi, with their 390 and 400 serie @ 40Mhz
You can even still buy those !
For a new design however, something more modern and at a better place on the price curve  is likely to be chosen.
eg STC Micro  STC8H8K64U-45I-TSSOP20 has 8K RAM 64K Flash FS-USB,  sub 30c 500+ at lcsc

 
The following users thanked this post: DiTBho

Offline DiTBho

  • Super Contributor
  • ***
  • Posts: 3915
  • Country: gb
Re: how can i assemble .asm file in linux for my 8051?
« Reply #17 on: September 06, 2023, 11:57:30 am »
normally 32bit CPUs.  But a 68000 was only considered a 16bit CPU and handled 24bit addresses, right?

Yup, although I was not at all satisfied with the development system based on a modified version of Codewarrior (please, don't ask how I got my hands on it), at least, since the Playstation1 is a system where CPU, BUS and CPU are all 32bit, I had less confusion in my head, 32bit? 16bit? 24bit? what is what? unlike 68k-based consoles made by SEGA and NEOGEO

  • The SEGA Genesis, commercially knon as "MegaDrive", was centered on a Motorola 68000 processor as the CPU (16bit bus), a Zilog Z80 as a sound controller, and a video system supporting hardware sprites, tiles, and scrolling, but it was advertized as "16-bit fourth generation home video game console"
  • The NeoGeo M1 was marketed as "the first 24-bit system", while its CPU was actually a 32-bit 68000 (16bit bus) with an 8-bit Z80 coprocessor, and the GPU chipset has a 24-bit (dedicated) graphics data bus.
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf