OpenCores
URL https://opencores.org/ocsvn/y80e/y80e/trunk

Subversion Repositories y80e

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /y80e/trunk/asm
    from Rev 4 to Rev 6
    Reverse comparison

Rev 4 → Rev 6

/int_opsd.s
50,8 → 50,8
db 029h
 
 
org 0ff32h
dw 03cceh ;ff32h
org 0ff2eh
dw 0d747h, 0d633h, 03cceh ;ff2eh
dw 08421h, 0edb7h, 0ff92h, 0d610h, 09678h ;ff34h
dw 02e00h, 00100h, 0001fh, 05a44h, 05a44h ;ff3eh
dw 06900h, 02e00h, 00100h, 0001fh, 0de00h ;ff48h
77,3 → 77,4
dw 05000h, 00004h, 05000h, 00003h ;fff0h
dw 0c202h, 00002h, 0c102h, 00001h ;fff8h
 
end
/180_ops.s
0,0 → 1,174
;**********************************************************************************
;* *
;* checks all z180 instructions *
;* *
;**********************************************************************************
aseg
 
org 00h
jp 100h
 
org 038h
jp (hl)
org 066h
jp (ix)
org 80h
db 00h, 01h, 2dh, 03h, 04h, 05h, 06h, 07h
db 0fh, 1eh, 02h, 3ch, 4bh, 5ah, 69h, 78h
 
org 0c0h ;pattern finish location
nop
jr 0c0h
 
org 0100h
di
ld sp, 0fffeh ;point sp at result table
xor a
ld hl, 01234h
ld de, 05678h
ld bc, 09abch
mlt sp
push af ;0044h @ fd00h
mlt hl
push hl ;03a8h @ fcfeh
mlt de
push de ;2850h @ fcfch
mlt bc
push bc ;7118h @ fcfah
push af ;0044h @ fcf8h
;
add a,1
in0 a,(080h) ;read 00h @ 0080h
push af ;0044h @ fcf6h
out0 (030h),b ;071 @ 0030h
push af ;0044h @ fcf4h
in0 a,(08ah) ;read 02h @ 008ah
push af ;0200h @ fcf2h
out0 (031h),c ;018 @ 0031h
push af ;0200h @ fcf0h
in0 b,(81h)
in0 c,(82h)
in0 d,(83h)
in0 e,(84h)
in0 h,(85h)
in0 l,(86h) ;read 06h @ 0086h
push af ;0204h @ fceeh
push bc ;012dh @ fcech
push de ;0304h @ fceah
push hl ;0506h @ fce8h
;
out0 (032h),l ;06h @ 0032h
out0 (033h),h ;05h @ 0033h
out0 (034h),a ;02h @ 0034h
out0 (035h),d ;03h @ 0035h
out0 (036h),e ;04h @ 0036h
push af ;0204h @ fce6h
;
ld a, 0a9h
tst b ;a9h & 01h = 01h
push af ;a910h @ fce4h
tst c ;a9h & 2dh = 29h
push af ;a910h @ fce2h
tst d ;a9h & 03h = 01h
push af ;a910h @ fce0h
scf
tst e ;a9h & 04h = 00h
push af ;a954h @ fcdeh
tst h ;a9h & 05h = 01h
push af ;a910h @ fcdch
ld l, 0f7h
tst l ;a9h & f7h = a1h
push af ;a990h @ fcdah
tst a ;a9h & a9h = a9h
push af ;a994h @ fcd8h
scf
ld hl, 01000h
tst (hl) ;a9h & b7h = a1h
push af ;a990h @ fcd6h
tst 056h ;a9h & 56h = 00h
push af ;a954h @ fcd4h
ld c, 08ch
scf
tstio 0aah ;a9h & 4bh = 09h
push af ;a914h @ fcd2h
;
xor a
ld hl, 02000h
ld bc, 00630h
otim ;read 71h @ 2000h
;write 71h @ 0030h
push af ;0006h @ fcd0h
push bc ;0531h @ fcceh
push hl ;2001h @ fccch
otimr ;read 18h @ 2001h
;write 18h @ 0031h
;read 06h @ 2002h
;write 06h @ 0032h
;read 05h @ 2003h
;write 05h @ 0033h
;read 02h @ 2004h
;write 02h @ 0034h
;read 03h @ 2005h
;write 03h @ 0035h
push af ;0046h @ fccah
push bc ;0036h @ fcc8h
push hl ;2006h @ fcc6h
ld b,1
otimr ;read 04h @ 2006h
;write 04h @ 0036h
push af ;0046h @ fcc4h
push bc ;0037h @ fcc2h
push hl ;2007h @ fcc0h
inc b
otim ;read aah @ 2007h
;write aah @ 0037h
push af ;0042h @ fcbeh
push bc ;0038h @ fcbch
push hl ;2008h @ fcbah
ld hl, 02007h
ld bc, 00637h
otdm ;read aah @ 2007h
;write aah @ 0037h
push af ;0002h @ fcb8h
push bc ;0536h @ fcb6h
push hl ;2006h @ fcb4h
otdmr ;read 04h @ 2006h
;write 04h @ 0036h
;read 03h @ 2005h
;write 03h @ 0035h
;read 02h @ 2004h
;write 02h @ 0034h
;read 05h @ 2003h
;write 05h @ 0033h
;read 06h @ 2002h
;write 06h @ 0032h
push af ;0042h @ fcb2h
push bc ;0031h @ fcb0h
push hl ;2001h @ fcaeh
inc b
xor 0aah
otdmr ;read 18h @ 2001h
;write 18h @ 0031h
push af ;aac6h @ fcach
push bc ;0030h @ fcaah
push hl ;2000h @ fca8h
inc b
otdm ;read 71h @ 2000h
;write 71h @ 0030h
push af ;aa42h @ fca6h
push bc ;002fh @ fca4h
push de ;0304h @ fca2h
push hl ;1fffh @ fca0h
;
ld hl, 00100h
jp 0c0h
org 01000h
db 0b7h
 
org 02000h
db 071h, 018h, 006h, 005h, 002h, 003h, 004h, 0aah
end
/180_opsd.s
0,0 → 1,24
;**********************************************************************************
;* *
;* 180_ops compare data *
;* *
;**********************************************************************************
org 030h
db 071h, 018h, 006h, 005h, 002h, 003h, 004h, 0aah
 
org 0fca0h
dw 01fffh, 00304h, 0002fh, 0aa42h ;fca0h
dw 02000h, 00030h, 0aac6h, 02001h ;fca8h
dw 00031h, 00042h, 02006h, 00536h ;fcb0h
dw 00002h, 02008h, 00038h, 00042h ;fcb8h
dw 02007h, 00037h, 00046h, 02006h ;fcc0h
dw 00036h, 00046h, 02001h, 00531h ;fcc8h
dw 00006h, 0a914h, 0a954h, 0a990h ;fcd0h
dw 0a994h, 0a990h, 0a910h, 0a954h ;fcd8h
dw 0a910h, 0a910h, 0a910h, 00204h ;fce0h
dw 00506h, 00304h, 0012dh, 00204h ;fce8h
dw 00200h, 00200h, 00044h, 00044h ;fcf0h
dw 00044h, 07118h, 02850h, 003a8h ;fcf8h
dw 00044h ;fd00h
end
/int_opss.s
50,8 → 50,8
db 029h
 
 
org 0ff32h
dw 03cceh ;ff32h
org 0ff2eh
dw 0d747h, 0d633h, 03cceh ;ff2eh
dw 08421h, 0edb7h, 0ff92h, 0d610h, 09678h ;ff34h
dw 02e00h, 00100h, 0001fh, 05a44h, 05a44h ;ff3eh
dw 06900h, 02e00h, 00100h, 0001fh, 0de00h ;ff48h
77,3 → 77,4
dw 05000h, 00004h, 05000h, 00003h ;fff0h
dw 0c202h, 00002h, 0c101h, 00001h ;fff8h
 
end
/ihex2vm.cpp
0,0 → 1,94
#include <iostream>
#include <fstream>
#include <iomanip>
#include <sstream>
#include <string>
#include <vector>
#include <cstring>
#include <cerrno>
 
int main(int argc, char *argv[])
{
std::istream *src = &std::cin;
std::ostream *dst = &std::cout;
std::cerr << "Intel HEX to Verilog readmemh converter" << std::endl;
if (argc > 1) {
std::fstream *file = new std::fstream(argv[1], std::ios::in);
src = file;
if (!file->is_open()) {
const char *err = strerror(errno);
std::cerr << "Failed to open input file: " << err << std::endl;
return 1;
}
if (argc > 2) {
file = new std::fstream(argv[2], std::ios::out);
dst = file;
if (!file->is_open()) {
const char *err = strerror(errno);
std::cerr << "Failed to open output file: " << err << std::endl;
return 1;
}
}
} else
std::cerr << "Usage:\n\t" << argv[0] << "[<input file> [<output file>]]\n" << "By default standard input and output are used" << std::endl;
 
std::string line;
std::vector<unsigned char> buffer;
int nline = 0;
*dst << std::uppercase;
while(std::getline(*src, line)) {
++nline;
if (line.empty())
continue;
char c[3];
std::istringstream str(line);
str >> c[0];
if (c[0] != ':') {
std::cerr << "Line " << nline << " has invalid format:\n'" << line << '\'' << std::endl;
return 1;
}
buffer.clear();
unsigned crc = 0;
str.clear();
c[2] = '\0';
c[0] = '\0';
while(str >> c[1]) {
if (c[0] == '\0') {
c[0] = c[1];
continue;
}
std::istringstream str(c);
unsigned x;
if (!(str >> std::hex >> x)) {
std::cerr << "Invalid entry size at line " << nline << std::endl;
return 1;
}
buffer.push_back((unsigned char)x);
crc += x;
c[0] = '\0';
}
std::cerr << std::endl;
if ((char)crc) {
std::cerr << "Invalid CRC of line " << nline << std::endl;
return 1;
}
if (buffer.size() < 5) {
std::cerr << "Invalid size of line " << nline << std::endl;
return 1;
}
if (buffer[3] == 1) //end of file
break;
int size = buffer[0];
int address = (buffer[1] << 8) + buffer[2];
*dst << '@' << std::hex << std::setw(4) << std::setfill('0') << address;
for(std::vector<unsigned char>::iterator i = buffer.begin() + 4, e = buffer.end()-1; i != e; ++i)
*dst << ' ' << std::hex << std::setw(2) << std::setfill('0') << unsigned(*i);
*dst << '\n';
}
 
if (dst != &std::cout)
delete dst;
if (src != &std::cin)
delete src;
return 0;
}
ihex2vm.cpp Property changes : Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/x-c++src \ No newline at end of property Index: build.bat =================================================================== Cannot display: file marked as a binary type. svn:mime-type = application/x-msdos-program Index: int_ops.s =================================================================== --- int_ops.s (revision 4) +++ int_ops.s (revision 6) @@ -496,6 +496,19 @@ push de push hl exx + + di + nop + slp + nop + + ld hl,0d740h + ei ;int next + slp ;d633h @ ff30h + rst 00h ;not executed + + org 0d640h + di ld hl, 0100h jp 0c0h @@ -503,6 +516,13 @@ nop ;int next xor c ;d700 @ ff96h + org 0d740h + di + ld hl,0d640h + nop ;nmi next + slp ;d747h @ ff2eh + rst 00h + org 0d7feh nop ;nmi next xor h ;d800 @ ff8ch @@ -510,12 +530,12 @@ org 0d8feh nop ;int next - adc h ;d900 @ ff82h + adc a,h ;d900 @ ff82h nop org 0d9feh nop ;nmi next - sbc h ;da00 @ ff78h + sbc a,h ;da00 @ ff78h nop org 0dafeh @@ -537,3 +557,5 @@ nop ;nmi next dec hl ;de00 @ ff50h nop + + end

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.