nedoPC.org

Community of electronics hobbyists established in 2002

...
Atom Feed | View unanswered posts | View active topics It is currently 24 Sep 2018 14:57



Reply to topic  [ 16 posts ]  Go to page Previous  1, 2
Самая короткая программа для эмуляции 8080 
Author Message
Admin
User avatar

Joined: 09 Jan 2003 00:22
Posts: 16955
Location: Colorado
Reply with quote
вот как оно выглядит после препроцессора (лучше причесать не получилось):
Code:
#include <stdio.h>

unsigned char o[10],l[78114],*c=l,*k=l+64506;
e,V,v,u,x,y,z,Z;

main(int r,char **U)
{
 for(v=fopen(((u=fopen(((e=fopen(((r-2?0:(V=fopen((1[U]),"rb+")),"C")),"rb+"),
       system("stty raw -echo min 0"),fread(l,78114,1,e),fclose((e)),"B")),"rb+"),"A")),"rb+");

     118-(x=*c++);

     (y=x/8%8,z=(x&199)-4)?(z-=1)?(z-=1)?(z-=186)?(z-=2)?(z-=2)?(z-=3)?(z-=0,r=(y>5)*2+y,
     z=(x&207)-1)?(z-=2)?(z-=6)?(z-=2)?(z-=182)?(z-=4)?x/8!=16+0&198+0*8!=x?
     x/8!=16+1&198+1*8!=x?x/8!=16+2&198+2*8!=x?x/8!=16+3&198+3*8!=x?x/8!=16+4&198+4*8!=x?
     x/8!=16+5&198+5*8!=x?x/8!=16+6&198+6*8!=x?x/8!=16+7&198+7*8!=x?(z=x-2)?(z-=5)?(z-=3)?
     (z-=5)?(z-=3)?(z-=5)?(z-=3)?(z-=5)?(z-=3)?(z-=5)?(z-=3)?(z-=5)?(z-=3)?(z-=5)?(z-=3)?
     (z-=5)?(z-=3 +129)?(z-=6)?(z-=4)?(z-=6)?(z-=8)?(z-=8)?(z-=6)?(z-=2)?(z-=2)?(z-=12)?
     x/64-1?((0)):((*((7&y)-6?&o[y&7]:&l[o[5]+256*o[5-1]])=*((7&x)-6?&o[x&7]:
     &l[o[5]+256*o[5-1]]))):((9[o]=*((7&5)-6?&o[5&7]:&l[o[5]+256*o[5-1]]),
     8[o]=*((7&4)-6?&o[4&7]:&l[o[5]+256*o[5-1]]))):((237==*c++?
     ((int (*)())(2-*c++?fwrite:fread))(l+*k+1[k]*256,128,1,
     (fseek(y=5[k]-1?u:v,((3[k]|4[k]<<8)<<7|2[k])<<7,*((7&7)-6?&o[7&7]:
     &l[o[5]+256*o[5-1]])=0),y)):0)):((y=*((7&5)-6?&o[5&7]:&l[o[5]+256*o[5-1]]),
     z=*((7&4)-6?&o[4&7]:&l[o[5]+256*o[5-1]]),*((7&5)-6?&o[5&7]:&l[o[5]+256*o[5-1]])=*((7&3)-6?
     &o[3&7]:&l[o[5]+256*o[5-1]]),*((7&4)-6?&o[4&7]:&l[o[5]+256*o[5-1]])=*((7&2)-6?&o[2&7]:
     &l[o[5]+256*o[5-1]]),*((7&3)-6?&o[3&7]:&l[o[5]+256*o[5-1]])=y,*((7&2)-6?&o[2&7]:
     &l[o[5]+256*o[5-1]])=z)):((c=l+o[5]+256*o[5-1])):((y=l[x=o[9]+256*o[9-1]],z=l[++x],
     x[l]=*((7&4)-6?&o[4&7]:&l[o[5]+256*o[5-1]]),l[--x]=*((7&5)-6?&o[5&7]:&l[o[5]+256*o[5-1]]),
     *((7&5)-6?&o[5&7]:&l[o[5]+256*o[5-1]])=y,*((7&4)-6?&o[4&7]:&l[o[5]+256*o[5-1]])=z)):
     ((2-*c?Z||read(0,&Z,1),1&*c++?*((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]])=Z,Z=0:
     (*((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]])=!!Z):(c++,*((7&7)-6?&o[7&7]:
     &l[o[5]+256*o[5-1]])=r=V?fgetc(V):-1,6[o]=6[o]&~1|r<0))):((++c,write(1,&7[o],1))):
     ((z=c+2-l,254>(9[o]-=2)||--8[o],l[o[9]+256*o[9-1]]=z,l[1+o[9]+256*o[9-1]]=z>>8,
     c=l+(c+=2,0[c-2]|1[c-2]<<8))):((z=l[o[9]+256*o[9-1]]|l[o[9]+256*o[9-1]+1]<<8,
     1<(9[o]+=2)||++8[o],c=l+z)):((c=l+(c+=2,0[c-2]|1[c-2]<<8))):((6[o]^=1)):
     ((*((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]])=(c+=2,0[c-2]|1[c-2]<<8)[l])):((6[o]|=1)):
     (((c+=2,0[c-2]|1[c-2]<<8)[l]=*((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]]))):
     ((*((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]])=~*((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]]))):
     ((*((7&5)-6?&o[5&7]:&l[o[5]+256*o[5-1]])=l[x=(c+=2,0[c-2]|1[c-2]<<8)],
     *((7&4)-6?&o[4&7]:&l[o[5]+256*o[5-1]])=l[++x])):((6[o]|=6[o]&16|9<*((7&7)-6?&o[7&7]:
     &l[o[5]+256*o[5-1]])%16?*((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]])+=6,16:0,
     z=6[o]|=1&6[o]|*((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]])>159?*((7&7)-6?&o[7&7]:
     &l[o[5]+256*o[5-1]])+=96,1:0,y=*((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]]),
     6[o]=6[o]<<8>>8&1|128&y|!(y&255)*64|16&z|2,y^=y>>4,y^=y<<2,y^=~y>>1,6[o]|=y&4)):
     ((l[x=(c+=2,0[c-2]|1[c-2]<<8)]=*((7&5)-6?&o[5&7]:&l[o[5]+256*o[5-1]]),
     l[++x]=*((7&4)-6?&o[4&7]:&l[o[5]+256*o[5-1]]))):((x=*((7&7)-6?&o[7&7]:
     &l[o[5]+256*o[5-1]])%2,*((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]])=*((7&7)-6?&o[7&7]:
     &l[o[5]+256*o[5-1]])/2+6[o]%2*128,6[o]=6[o]&~1|x)):((*((7&7)-6?&o[7&7]:
     &l[o[5]+256*o[5-1]])=l[o[3]+256*o[3-1]])):((x=*((7&7)-6?&o[7&7]:
     &l[o[5]+256*o[5-1]])/128,*((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]])=*((7&7)-6?
     &o[7&7]:&l[o[5]+256*o[5-1]])*2+6[o]%2,6[o]=6[o]&~1|x)):
     ((l[o[3]+256*o[3-1]]=*((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]]))):
     ((6[o]=6[o]&~1|1&*((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]]),
     *((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]])=*((7&7)-6?&o[7&7]:
     &l[o[5]+256*o[5-1]])/2|*((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]])<<7)):
     ((*((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]])=l[o[1]+256*o[1-1]])):
     ((6[o]=~1&6[o]|*((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]])>>7,*((7&7)-6?&o[7&7]:
     &l[o[5]+256*o[5-1]])=*((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]])*2|*((7&7)-6?
     &o[7&7]:&l[o[5]+256*o[5-1]])>>7)):((l[o[1]+256*o[1-1]]=*((7&7)-6?&o[7&7]:
     &l[o[5]+256*o[5-1]]))):((x=64&x?*c++:*((7&x)-6?&o[x&7]:&l[o[5]+256*o[5-1]]),
     y=y=(z=*((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]])%16-x%16-0,*((7&7)-6?&o[7&7]:
     &l[o[5]+256*o[5-1]])- x- 0),6[o]=y>>8&1|128&y|!(y&255)*64|16&z|2,y^=y>>4,y^=y<<2,y^=~y>>1,
     6[o]|=y&4)):((x=64&x?*c++:*((7&x)-6?&o[x&7]:&l[o[5]+256*o[5-1]]),z=0,
     y=*((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]])|=x,6[o]=y>>8&1|128&y|!(y&255)*64|16&z|2,y^=y>>4,
     y^=y<<2,y^=~y>>1,6[o]|=y&4)):((x=64&x?*c++:*((7&x)-6?&o[x&7]:&l[o[5]+256*o[5-1]]),z=0,
     y=*((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]])^=x,6[o]=y>>8&1|128&y|!(y&255)*64|16&z|2,y^=y>>4,
     y^=y<<2,y^=~y>>1,6[o]|=y&4)):((x=64&x?*c++:*((7&x)-6?&o[x&7]:&l[o[5]+256*o[5-1]]),
     z=*((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]])*2|2*x,y=*((7&7)-6?&o[7&7]:
     &l[o[5]+256*o[5-1]])&=x,6[o]=y>>8&1|128&y|!(y&255)*64|16&z|2,y^=y>>4,y^=y<<2,y^=~y>>1,
     6[o]|=y&4)):((x=64&x?*c++:*((7&x)-6?&o[x&7]:&l[o[5]+256*o[5-1]]),
     *((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]])=y=(z=*((7&7)-6?&o[7&7]:
     &l[o[5]+256*o[5-1]])%16- x%16- 6[o]%2,*((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]])-x-6[o]%2),
     6[o]=y>>8&1|128&y|!(y&255)*64|16&z|2,y^=y>>4,y^=y<<2,y^=~y>>1,6[o]|=y&4)):
     ((x=64&x?*c++:*((7&x)-6?&o[x&7]:&l[o[5]+256*o[5-1]]), *((7&7)-6?&o[7&7]:
     &l[o[5]+256*o[5-1]])=y=(z=*((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]])%16-x%16-0,
     *((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]])- x- 0),6[o]=y>>8&1|128&y|!(y&255)*64|16&z|2,
     y^=y>>4,y^=y<<2,y^=~y>>1,6[o]|=y&4)):((x=64&x?*c++:*((7&x)-6?&o[x&7]:&l[o[5]+256*o[5-1]]),
     *((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]])=y=(z=*((7&7)-6?&o[7&7]:
     &l[o[5]+256*o[5-1]])%16 + x%16 + 6[o]%2,*((7&7)-6?&o[7&7]:
     &l[o[5]+256*o[5-1]])+ x + 6[o]%2),6[o]=y>>8&1|128&y|!(y&255)*64|16&z|2,y^=y>>4,y^=y<<2,
     y^=~y>>1,6[o]|=y&4)):((x=64&x?*c++:*((7&x)-6?&o[x&7]:&l[o[5]+256*o[5-1]]),
     *((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]])=y=(z=*((7&7)-6?&o[7&7]:
     &l[o[5]+256*o[5-1]])%16 + x%16 + 0,*((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]])+ x + 0),
     6[o]=y>>8&1|128&y|!(y&255)*64|16&z|2,y^=y>>4,y^=y<<2,y^=~y>>1,6[o]|=y&4)):
     ((z=r-8?o[r+1]+256*o[r+1-1]:6[o]|*((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]])<<8,
     254>(9[o]-=2)||--8[o],l[o[9]+256*o[9-1]]=z,l[1+o[9]+256*o[9-1]]=z>>8)):
     ((z=l[o[9]+256*o[9-1]]|l[o[9]+256*o[9-1]+1]<<8,1<(9[o]+=2)||++8[o],r-8?o[r+1]=z,
     r[o]=z>>8:(6[o]=~40&z|2,*((7&7)-6?&o[7&7]:&l[o[5]+256*o[5-1]])=z>>8))):
     ((r[o]--||--o[r-1])):((*((7&5)-6?&o[5&7]:&l[o[5]+256*o[5-1]])=z=*((7&5)-6?&o[5&7]:
     &l[o[5]+256*o[5-1]])+r[o],*((7&4)-6?&o[4&7]:&l[o[5]+256*o[5-1]])=z=*((7&4)-6?&o[4&7]:
     &l[o[5]+256*o[5-1]])+o[r-1]+z/256,6[o]=~1&6[o]|z>>8)):((++o[r+1]||r[o]++)):
     ((o[r+1]=*c++,r[o]=*c++)):((z=c-l,254>(9[o]-=2)||--8[o],l[o[9]+256*o[9-1]]=z,
     l[1+o[9]+256*o[9-1]]=z>>8,c=y*8+l)):((x=(c+=2,0[c-2]|1[c-2]<<8),
     (y&1?~6[o]:6[o])>>"\6\0\2\7"[y/2]&1?0:(z=c-l,254>(9[o]-=2)||--8[o],
     l[o[9]+256*o[9-1]]=z,l[1+o[9]+256*o[9-1]]=z>>8,c=l+x))):((x=(c+=2,0[c-2]|1[c-2]<<8),
     (y&1?~6[o]:6[o])>>"\6\0\2\7"[y/2]&1?0:(c=l+x))):(((y&1?~6[o]:6[o])>>"\6\0\2\7"[y/2]&1?
     0:(z=l[o[9]+256*o[9-1]]|l[o[9]+256*o[9-1]+1]<<8,1<(9[o]+=2)||++8[o],c=l+z))):
     ((*((7&y)-6?&o[y&7]:&l[o[5]+256*o[5-1]])=*c++)):((r=y,x=0,*((7&r)-6?&o[r&7]:
     &l[o[5]+256*o[5-1]])=y=(z=*((7&y)-6?&o[y&7]:&l[o[5]+256*o[5-1]])%16- x%16- 1,
     *((7&y)-6?&o[y&7]:&l[o[5]+256*o[5-1]])- x- 1),6[o]=6[o]<<8>>8&1|128&y|!(y&255)*64|16&z|2,
     y^=y>>4,y^=y<<2,y^=~y>>1,6[o]|=y&4)):((r=y,x=0,*((7&r)-6?&o[r&7]:
     &l[o[5]+256*o[5-1]])=y=(z=*((7&y)-6?&o[y&7]:&l[o[5]+256*o[5-1]])%16 + x%16 + 1,
     *((7&y)-6?&o[y&7]:&l[o[5]+256*o[5-1]])+ x + 1),6[o]=6[o]<<8>>8&1|128&y|!(y&255)*64|16&z|2,
     y^=y>>4,y^=y<<2,y^=~y>>1,6[o]|=y&4))
 );
 system("stty cooked echo");
 fclose(((fclose(((V?fclose((V)):0,u))),v)));
}

_________________
:eugeek: https://twitter.com/Shaos1973


29 Jan 2016 00:14
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 16 posts ]  Go to page Previous  1, 2

Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.