-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ZSM v3.4 from my RetroProjects repository.
- Loading branch information
0 parents
commit b21dda1
Showing
52 changed files
with
13,105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# --------------------------- | ||
# MESCC & TOOL CHAIN BINARIES | ||
# --------------------------- | ||
cpm.exe | ||
cpm2.exe | ||
cpm_player.exe | ||
cc.com | ||
cc.COM | ||
CC.COM | ||
ccopt.com | ||
ccopt.COM | ||
CCOPT.COM | ||
#zsm.com | ||
#ZSM.COM | ||
#hextocom.com | ||
#hextocom.COM | ||
#HEXTOCOM.COM | ||
#link.com | ||
#LINK.COM | ||
#prntosym.com | ||
#prntosym.COM | ||
#PRNTOSYM.COM | ||
#zmac.exe | ||
|
||
# --------------- | ||
# MESCC LIBRARIES | ||
# --------------- | ||
alloc.h | ||
atexit.h | ||
bsearch.h | ||
clock.h | ||
conio.h | ||
cpm.h | ||
ctype.h | ||
fileio.h | ||
fprintf.h | ||
mem.h | ||
mescc.h | ||
printf.h | ||
qsort.h | ||
rand.h | ||
redir.h | ||
setjmp.h | ||
sprintf.h | ||
stdbool.h | ||
string.h | ||
xprintf.h | ||
z80.h | ||
|
||
# ------------------ | ||
# INTERMEDIATE FILES | ||
# ------------------ | ||
*.HEX | ||
*.ZSM | ||
*.PRN | ||
|
||
# ----------------------- | ||
# PROJECT FILES & FOLDERS | ||
# ----------------------- | ||
backup/ |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
/* BinToAsm.c | ||
Converts a binary file into an assembler file for Z80. | ||
Copyright (C) 2004-2015 Miguel I. Garcia Lopez, FloppySoftware | ||
This program is free software; you can redistribute it and/or modify it | ||
under the terms of the GNU General Public License as published by the | ||
Free Software Foundation; either version 2, or (at your option) any | ||
later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program; if not, write to the Free Software | ||
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | ||
To compile with MESCC: | ||
cc bintoasm | ||
ccopt bintoasm.zsm | ||
zsm bintoasm | ||
hextocom bintoasm | ||
Revisions: | ||
22 Feb 2004 : v1.00 | ||
03 Apr 2007 : v1.01 / Minor changes. | ||
10 Apr 2007 : Output 8 bytes in a line instead of 16. | ||
15 May 2007 : v1.02 / Added title & usage help. | ||
04 Sep 2015 : v1.03 / Amended some messages and comments. | ||
*/ | ||
|
||
#include <mescc.h> | ||
#include <conio.h> | ||
#include <string.h> | ||
#include <ctype.h> | ||
#include <fileio.h> | ||
#include <printf.h> | ||
#include <fprintf.h> | ||
|
||
#define VERSION "1.03 / 04 Sep 2015\n\n(c) 2004-2015 FloppySoftware" | ||
|
||
FILE *fpi, *fpo; | ||
|
||
int data, chpos; | ||
unsigned counter; | ||
|
||
main(argc, argv) | ||
int argc, argv[]; | ||
{ | ||
printf("BinToAsm v%s\n\n", VERSION); | ||
|
||
if(argc!=3) | ||
{ | ||
printf("Usage: bintoasm binfile asmfile\n"); | ||
exit(1); | ||
} | ||
|
||
if((fpi=fopen(argv[1],"rb"))==NULL) | ||
error("Opening input file"); | ||
|
||
if((fpo=fopen(argv[2],"w"))==NULL) | ||
error("Opening output file"); | ||
|
||
counter=chpos=0; | ||
|
||
while((data=fgetc(fpi))!=EOF) | ||
{ | ||
if(!chpos) | ||
fprintf(fpo, " DEFB"); | ||
|
||
fprintf(fpo, " %03d", data); | ||
|
||
if(++chpos!=8) | ||
fprintf(fpo, ","); | ||
else | ||
{ | ||
fprintf(fpo, "\n"); | ||
chpos=0; | ||
} | ||
|
||
++counter; | ||
} | ||
|
||
printf("%d bytes\n", counter); | ||
|
||
if(fclose(fpi)) | ||
error("Closing input file"); | ||
|
||
if(fclose(fpo)) | ||
error("Closing output file"); | ||
} | ||
|
||
error(txt) | ||
char *txt; | ||
{ | ||
printf("ERROR: %s\n", txt); | ||
exit(1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,157 @@ | ||
/* dump.c | ||
Print contents of a file in byte and ascii format. | ||
(c) 2000-2015 Miguel I. Garcia Lopez, FloppySoftware. | ||
This program is free software; you can redistribute it and/or modify it | ||
under the terms of the GNU General Public License as published by the | ||
Free Software Foundation; either version 2 of the License, or (at your | ||
option) any later version. | ||
This program is distributed in the hope that it will be useful, but | ||
WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program; if not, write to the Free Software | ||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
Usage: | ||
dump filename | ||
To compile with MESCC: | ||
cc dump | ||
ccopt dump.zsm | ||
zsm dump | ||
hextocom dump | ||
Revisions: | ||
?? ?? 2000 : v1.00 | ||
10 Nov 2013 : v1.20 | ||
04 Sep 2015 : v1.21 : Amended some messages and comments. | ||
*/ | ||
|
||
/* LIBRARIES | ||
*/ | ||
|
||
#define CC_FREAD | ||
|
||
#include <mescc.h> | ||
#include <conio.h> | ||
#include <fileio.h> | ||
|
||
/* DEFs | ||
*/ | ||
|
||
#define VERSION "Dump v1.21 / 04 Sep 2015\n\n(c) 2000-2015 FloppySoftware" | ||
|
||
/* PROGRAM | ||
*/ | ||
|
||
main(argc,argv) | ||
int argc; | ||
int argv[]; | ||
{ | ||
int i, /* Counter */ | ||
offset; /* Offset in file */ | ||
|
||
FILE *fp; /* Channel for file */ | ||
|
||
char buffer[16]; /* Buffer for input file */ | ||
|
||
/* Check right number of parameters */ | ||
|
||
if(argc != 2) | ||
{ | ||
puts(VERSION); | ||
puts("\nUsage: dump fname"); | ||
return 1; | ||
} | ||
|
||
/* Open file in binary mode */ | ||
|
||
if((fp = fopen((argv[1]),"rb")) == NULL) | ||
error("Can't open file"); | ||
|
||
/* Initialize variables */ | ||
|
||
offset=0; | ||
|
||
/* Start */ | ||
|
||
while(fread(buffer, 16, 1, fp) == 1) | ||
{ | ||
/* Print offset */ | ||
|
||
puthex4(offset); putchar(' '); putchar(':'); putchar(' '); | ||
|
||
/* Print data in hexadecimal format */ | ||
|
||
for(i = 0; i < 16; ++i) | ||
{ | ||
puthex2(buffer[i]); putchar(' '); | ||
} | ||
|
||
/* Separator */ | ||
|
||
putchar(':'); putchar(' '); | ||
|
||
/* Print data in ascii format */ | ||
|
||
for(i = 0; i < 16; ++i) | ||
{ | ||
if(buffer[i] > 31 && buffer[i] < 128) | ||
putchar(buffer[i]); | ||
else | ||
putchar('.'); | ||
} | ||
|
||
/* End of line */ | ||
|
||
putchar('\n'); | ||
|
||
/* Update offset */ | ||
|
||
offset += 16; | ||
} | ||
|
||
fclose(fp); | ||
|
||
return 0; | ||
} | ||
|
||
error(txt) | ||
char *txt; | ||
{ | ||
puts(txt); | ||
|
||
exit(1); | ||
} | ||
|
||
puthex4(word) | ||
int word; | ||
{ | ||
puthex2(word >> 8); | ||
puthex2(word); | ||
} | ||
|
||
puthex2(byte) | ||
char byte; | ||
{ | ||
puthex1(byte >> 4); | ||
puthex1(byte); | ||
} | ||
|
||
puthex1(nibble) | ||
char nibble; | ||
{ | ||
nibble &= 0x0F; | ||
|
||
putchar(nibble < 10 ? '0' + nibble : 'A' + nibble - 10); | ||
} | ||
|
Oops, something went wrong.