Skip to content

Commit

Permalink
Transition to version 2.0.0 .
Browse files Browse the repository at this point in the history
git hops over all intermediate cvs files.
  • Loading branch information
albertvanderhorst committed Oct 22, 2019
1 parent 69f7120 commit 268b1e7
Show file tree
Hide file tree
Showing 47 changed files with 393 additions and 252 deletions.
36 changes: 23 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id$
# $Id: Makefile,v 1.72 2019/10/21 10:03:39 albert Exp $
# Copyright(2000): Albert van der Horst, HCC FIG Holland by GNU Public License
#
# This defines the usage of ciforth to build assemblers and reverse
Expand Down Expand Up @@ -133,7 +133,7 @@ forth.lab \
cul.5 \
ciasdis.1 \
README.assembler \
assembler.itxt \
assembler.txt \
p0.asi386.ps \
p0F.asi386.ps \
qr8086.ps \
Expand All @@ -150,11 +150,6 @@ lina405equ.cul \
lina405.cul \
# That's all folks!

# Test output references
TESTREF= \
lina405.asm \
# That's all folks!

RELEASEASSEMBLER= \
Makefile \
$(ASSRC) \
Expand Down Expand Up @@ -242,11 +237,11 @@ install: default $(MISC_DOC) ciasdis.1 cul.5 install_bin
cp -f copyright $(INSTALLDIR)/usr/share/doc/ciasdis

# If tests fails, test targets must be inspected.
.PRECIOUS: rf751.asm rf751.cul lina405.asm test.bin
.PRECIOUS: $(TESTTARGETS)
.PRECIOUS: $(TESTAS)

.PHONY: RELEASE default all clean releaseproof zip \
regressiontest testexamples debian
regressiontest regressiontest64 testexamples debian

all: regressiontest

Expand All @@ -255,6 +250,7 @@ clean: testclean install_clean
rm -f *.bin
rm -f ciasdis_tbi*
rm -f *.ps
rm -f $(TESTTARGETS)

# How to get rid of the Debian test directory
install_clean: ; # TBS
Expand Down Expand Up @@ -385,8 +381,8 @@ gset386.diff: gset386 ; \
# Testsets are generated by the SHOW-ALL command.
# Once testsets are present, they can be used to test SHOW-ALL

gsetall : gsetalpha gset6809 gset80 gset86 gset386-16 gsetallpentium
gsetallpentium : gset386 gsetpentium
gsetall : gsetalpha gset6809 gset80 gset86 gset386-16 gsetallpentium

# gsetxxx contains all instruction that can be accepted.
# This can be checked against expectation. Once that is done
Expand Down Expand Up @@ -440,23 +436,26 @@ RELEASE: $(RELEASEASSEMBLER) cias ciasdis cidis $(ASSRCCLUDGE) ;\

# Preliminary until it is clear whether we want other disassemblers.
# Note: this will use a copy of forth.lab to the local directory as ciasdis.lab
ciasdis : $(ASSRC) asi386.frt asipentium.frt ; $(FORTH) -c $@.frt
ciasdis : $(ASSRC) asi386.frt asipentium.frt version.frt; $(FORTH) -c $@.frt
cias : ciasdis ; ln -f ciasdis cias
cidis : ciasdis ; ln -f ciasdis cidis
version.frt: ; touch $@

test.bin : ciasdis cidis cias test.asm test.cul
ciasdis -a test.asm test.bin
ciasdis -d test.bin test.cul > test2.asm
ciasdis -a test2.asm test2.bin
diff test2.bin test.bin
$(DIFF_BIN) test.bin
$(DIFF_TXT) test2.asm
# Cosmetic difference in 64 bit.
$(DIFF_TXT) test2.asm || true
cias test.asm test.bin
cidis test.bin test.cul > test2.asm
cias test2.asm test2.bin
diff test2.bin test.bin
$(DIFF_BIN) test.bin
$(DIFF_TXT) test2.asm
# Cosmetic difference in 64 bit.
$(DIFF_TXT) test2.asm || true

lina405.asm : ciasdis lina405equ.cul lina405.cul testcmp/lina405
cp testcmp/lina405 .
Expand All @@ -479,11 +478,22 @@ rf751.asm : ciasdis rf751equ.cul rf751.cul testcmp/rf751
ciasdis -a $@ rf751
$(DIFF_BIN) rf751

# The crawling fails for 64 bits, test only disassembly/assembly.
rf751-64.asm : ciasdis rf751equ.cul testcmp/rf751.cul testcmp/rf751
ciasdis -d testcmp/rf751 testcmp/rf751.cul >rf751.asm
$(DIFF_TXT) rf751.asm || true
ciasdis -a rf751.asm rf751
$(DIFF_BIN) rf751

%.bin : %.asm ; ciasdis -a $< $@

cidis386.zip : $(ASSRC) asi386.frt asipentium.frt ; zip $@ $+

testexamples : test.bin lina405.asm rf751.asm

testexamples64 : test.bin lina405.asm rf751-64.asm

# -----------------
regressiontest64 : testasses testexamples64 gsetall gset386.diff
# The real test, 64 bits misses rf751
regressiontest : testasses testexamples gsetall gset386.diff
96 changes: 50 additions & 46 deletions README.assembler
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
This is the archive of the assembler to complement the aiforth and
ciforth Forth implementations.
See http://home.hccnet.nl/a.w.m.van.der.horst/forthimpl.frt
Since ciforth 4.0.5 tools like struct's and bags are no longer needed
in the assembler distribution.

Release 0.2.0 and 0.3.0 are marked REL-0-2-0 and REL-0-2-0 in the RCS archive.
They pass the full regressiontest as specified in the Makefile.
They are based on lina 4.0.6.
The current version of ciasdis is 2.0 and it is based on version
5.3.0 of 32 bits lina and the beta release of 64 bits lina of
2017oct29. To understand the mnemonics you need the documentation of
these Forth's.
(Version 1.0.0 are based on lina 32 bits 4.0.# , some in as a deb package.)

From day one the reverse engineering assembler had the property that
disassembly was based on the same tables as assembly, and that disassembled
binaries, could be reassembled to the exact same binary.
This is now complemented by consult files that supply the disassembler with
This is complemented by consult files that supply the disassembler with
information to generate a readable and documented source with label names.
Consult files can be built up incrementally.

The files marked * are generated
Sources :
The files marked % are generated

-----------------SOURCES ----------------------------------------

Generic source
asgen.frt Generic assembler / disassembler.
Expand All @@ -30,62 +30,66 @@ ass.frt The 8086 prototype of the postit/fixup principle
no error detection

Plug ins
as80.frt 8080 plug in
as*.frt Assembler plugins e.g.
asi86.frt 8086 plug in
asi386.frt 80386 plug in
as6809.frt 6809 plug in
asalpha.frt DEC Alpha plug in
as*s.frt Assembler screen version e.g.
as8086s.frt minimal 8086 assembler

------------- TEST SETS ------------------------------
testset* Assembler testsets

Test sets:
testset8080 8080 testset
testset8086 8086 testset
testset386 386 testset
testset386a 386 testset for SIB byte
testset6809 6809 testset
testsetalpha alpha testset
asm386endtest total 386 test (not checked before this release.)

Quick reference cards:
------------- QUICK REFERENCE ------------------------
ps.frt Source that generates postscript
qr8080.ps* 8080
qr8086.ps* 8086
p0.asi386.ps* 80386 main page
p0F.asi386.ps* 80386 instructions starting with 0F

Reverse engineering tool
ciasdis.frt Main program and glue.
ciasdis* reverse engineering ``computer intelligence assembler/disassembler''.
cias* assembler (link to ciasdis)
cidis* disassembler (link to ciasdis)
qr8080.ps% 8080
qr8086.ps% 8086
p0.asi386.ps% 80386 main page
p0F.asi386.ps% 80386 instructions starting with 0F

---------------- CIASDIS --------------------------
Reverse engineering tool for i86
ciasdis.frt Main program and glue, uses asgen.frt and
asi386.frt i86 specific
asipentium.frt i86 specific
crawl.frt Code crawler: finds code via jumps and calls.
aswrap.frt Must be loaded before plugin to turn into two pass assembler.
labelas.frt Make generic assembler into a classic two pass assembler
labeldis.frt Label database generation for ciasdis (386 specific!)
access.frt Auxiliary : i.a. memory access w.r.t. target space.
tools.frt Auxiliary low level

Generated
ciasdis% reverse engineering
``computer intelligence assembler/disassembler''.
cias% assembler (link to ciasdis)
cidis% disassembler (link to ciasdis)

--------------------- AUXILIARY ------------------------
Consult files for ciasdis
elf.cul Analysis of elf headers
exeheader.cul Analysis of simple .exe headers (non-Windows)

Test of reverse engineering tool
test.asm Test: asm --> bin --> asm --> bin
test.cul Consult file for test.asm
lina405 Test binary: lina 4.0.5
linacrawl.cul Test: dedicated crawler for ciforth, adapted to lina 4.0.5
lina405equ.cul+ Equ's generated via linacrawl.cul , must be included in lina405.asm
lina405.cul+ Labels's generated via linacrawl.cul , need not be included in lina405.asm
lina405.asm* Generated from lina405 by 2 preceeding cul files.

+) These files are generated using linacrawl.cul then manually adapted.

Cludges if an OS can't inspect argument 0 (MS stuff)
Cludge in behalf of Microsoft
cias.frt Main program for assembler
cidis.frt Main program for disassembler

Layer to turn Forth assembler in classic two pass assembler
Documentation
The suffix ``mi'' is about files to be processed by m4 then texinfo.
assembler.mi
[The suffix ``mi'' is about files to be processed by m4 then texinfo.]
assembler.mi Contained in ciforth/lina documentation.
cias.1 manual page for
cul.5 the underlying language for reverse engineering

Files as a test source and/or to compare with.
testcmp/*
This contains i.a..
test.asm Test: asm --> bin --> asm --> bin
test.cul Consult file for test.asm
lina405 Test binary: lina 4.0.5
linacrawl.cul Test: dedicated crawler for ciforth, adapted to lina 4.0.5
lina405equ.cul+ Equ's generated via linacrawl.cul ,
must be included in lina405.asm
lina405.cul Labels's generated via linacrawl.cul ,
need not be included in lina405.asm
lina405.asm* Generated from lina405 by 2 preceeding cul files.
rf751* Similar for retroforth 7.5.1
96 changes: 50 additions & 46 deletions README.assembler.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@
This is the archive of the assembler to complement the aiforth and
ciforth Forth implementations.
See http://home.hccnet.nl/a.w.m.van.der.horst/forthimpl.frt
Since ciforth 4.0.5 tools like struct's and bags are no longer needed
in the assembler distribution.

Release 0.2.0 and 0.3.0 are marked REL-0-2-0 and REL-0-2-0 in the RCS archive.
They pass the full regressiontest as specified in the Makefile.
They are based on lina 4.0.6.
The current version of ciasdis is 2.0 and it is based on version
5.3.0 of 32 bits lina and the beta release of 64 bits lina of
2017oct29. To understand the mnemonics you need the documentation of
these Forth's.
(Version 1.0.0 are based on lina 32 bits 4.0.# , some in as a deb package.)

From day one the reverse engineering assembler had the property that
disassembly was based on the same tables as assembly, and that disassembled
binaries, could be reassembled to the exact same binary.
This is now complemented by consult files that supply the disassembler with
This is complemented by consult files that supply the disassembler with
information to generate a readable and documented source with label names.
Consult files can be built up incrementally.

The files marked * are generated
Sources :
The files marked % are generated

-----------------SOURCES ----------------------------------------

Generic source
asgen.frt Generic assembler / disassembler.
Expand All @@ -30,62 +30,66 @@ ass.frt The 8086 prototype of the postit/fixup principle
no error detection

Plug ins
as80.frt 8080 plug in
as*.frt Assembler plugins e.g.
asi86.frt 8086 plug in
asi386.frt 80386 plug in
as6809.frt 6809 plug in
asalpha.frt DEC Alpha plug in
as*s.frt Assembler screen version e.g.
as8086s.frt minimal 8086 assembler

------------- TEST SETS ------------------------------
testset* Assembler testsets

Test sets:
testset8080 8080 testset
testset8086 8086 testset
testset386 386 testset
testset386a 386 testset for SIB byte
testset6809 6809 testset
testsetalpha alpha testset
asm386endtest total 386 test (not checked before this release.)

Quick reference cards:
------------- QUICK REFERENCE ------------------------
ps.frt Source that generates postscript
qr8080.ps* 8080
qr8086.ps* 8086
p0.asi386.ps* 80386 main page
p0F.asi386.ps* 80386 instructions starting with 0F

Reverse engineering tool
ciasdis.frt Main program and glue.
ciasdis* reverse engineering ``computer intelligence assembler/disassembler''.
cias* assembler (link to ciasdis)
cidis* disassembler (link to ciasdis)
qr8080.ps% 8080
qr8086.ps% 8086
p0.asi386.ps% 80386 main page
p0F.asi386.ps% 80386 instructions starting with 0F

---------------- CIASDIS --------------------------
Reverse engineering tool for i86
ciasdis.frt Main program and glue, uses asgen.frt and
asi386.frt i86 specific
asipentium.frt i86 specific
crawl.frt Code crawler: finds code via jumps and calls.
aswrap.frt Must be loaded before plugin to turn into two pass assembler.
labelas.frt Make generic assembler into a classic two pass assembler
labeldis.frt Label database generation for ciasdis (386 specific!)
access.frt Auxiliary : i.a. memory access w.r.t. target space.
tools.frt Auxiliary low level

Generated
ciasdis% reverse engineering
``computer intelligence assembler/disassembler''.
cias% assembler (link to ciasdis)
cidis% disassembler (link to ciasdis)

--------------------- AUXILIARY ------------------------
Consult files for ciasdis
elf.cul Analysis of elf headers
exeheader.cul Analysis of simple .exe headers (non-Windows)

Test of reverse engineering tool
test.asm Test: asm --> bin --> asm --> bin
test.cul Consult file for test.asm
lina405 Test binary: lina 4.0.5
linacrawl.cul Test: dedicated crawler for ciforth, adapted to lina 4.0.5
lina405equ.cul+ Equ's generated via linacrawl.cul , must be included in lina405.asm
lina405.cul+ Labels's generated via linacrawl.cul , need not be included in lina405.asm
lina405.asm* Generated from lina405 by 2 preceeding cul files.

+) These files are generated using linacrawl.cul then manually adapted.

Cludges if an OS can't inspect argument 0 (MS stuff)
Cludge in behalf of Microsoft
cias.frt Main program for assembler
cidis.frt Main program for disassembler

Layer to turn Forth assembler in classic two pass assembler
Documentation
The suffix ``mi'' is about files to be processed by m4 then texinfo.
assembler.mi
[The suffix ``mi'' is about files to be processed by m4 then texinfo.]
assembler.mi Contained in ciforth/lina documentation.
cias.1 manual page for
cul.5 the underlying language for reverse engineering

Files as a test source and/or to compare with.
testcmp/*
This contains i.a..
test.asm Test: asm --> bin --> asm --> bin
test.cul Consult file for test.asm
lina405 Test binary: lina 4.0.5
linacrawl.cul Test: dedicated crawler for ciforth, adapted to lina 4.0.5
lina405equ.cul+ Equ's generated via linacrawl.cul ,
must be included in lina405.asm
lina405.cul Labels's generated via linacrawl.cul ,
need not be included in lina405.asm
lina405.asm* Generated from lina405 by 2 preceeding cul files.
rf751* Similar for retroforth 7.5.1
Loading

0 comments on commit 268b1e7

Please sign in to comment.