About PC110
ZXNet echo conference «zx.spectrum»
From Igor Maznitsa → To All 23 February 1998
St.Petersburg codepage 866
Monday February 23, 1998
20:39
Hello comrade All!
Here people keep writing to me that somewhere my translator was covered, everyone, so to speak, sniffed it, but no one tried it, - except for the first section no one saw anything else with the description, and therefore I decided to take extreme measures, -
that is, having decided in the extreme of my understanding that all this happened due to
the size of the files, then I tried to split it into 7 sections of 5 kb each. So
look for files with the names PC110 (1/7) through PC110 (7/7).
Sincerely yours Igor
>> Together We will put an end to all bourgeois evil spirits!!!!!
E-Mail : ray...@itm.spb.su
From Vova Hex → To All 25 February 1998
Hi!
On 23 Feb 98 (20:38) you wrote something I decided to answer..
IM> Here people always write to me that somewhere my translator was covered, everyone,
IM>, so to speak, sniffed it, but no one tried it, - apart from the first section with
IM> the description, no one saw anything else, and therefore I decided to extreme
IM> measures, - that is, having decided in my extreme understanding that all this happened
IM> because of the size of the files, then I tried to break it into 7 sections of 5 kb each. So
IM> look for files with the names PC110 (1/7) to PC110 (7/7).
Either it reached me broken again or it works somehow.. Well, for started when
I just launched it, the words “Open input failer” flashed across the screen, until I
him ^C. Then, having shown him the file (included in the kit), it turned out that it needed to be redirected (pc110 file.c > file.a80). Well, then, when it came to
assembly, it turned out that it was full of commands like these:
=== Cut ===
LD BC,(c)
INC BC
LD (c),BC === Cut ===
And the assembler, naturally, does not digest them.. He thinks that this is register
C. Then all sorts of lines like
=== Cut ===
1 errors in compilation. -- is it impossible to specify it?
5632 instructions generated.
824 source lines.
=== Cut ===
and "Open output failer"... It would be nice to comment on them. It would be nice to
use code 09h - and it will lookbetter, and take up less..
The 'source code' in assembler turned out to be 115 kilobytes, almost half consists of
repetitive pieces (it is not surprising that the program itself takes up 40,000 bytes)...
The file laser.a80 is missing... In general, it was not possible to try this miracle (subject)..
Yours truly, Hexman/BYTEX.
[Team ZX ASM] [Team Metallica] [Team Art Works]
From Igor Maznitsa → To All 25 February 1998
St. Petersburg codepage 866
Wednesday February 25 1998
20:54
Hello comrade Vova!
Looks like someone managed to get a translator. I didn’t hope for this,
and therefore didn’t insert any description.
You should broadcast it like this:
pc110 file.c file.a80
in terms of commands, this is the spitting image of microC (or rather, it is microC)
I added a command there
goto label
the labels themselves are inserted
:label
and also added preprocessor commands
#label name - this command is the names of the labels inserted into
the assembly file
#list - this command includes in assembly file
lines from a C program
only one-dimensional arrays are allowed there.
of the data types, there are only int and char, pointers are also allowed
there is if, while , but there is no for, switch
there is -,+,--,++,>>,<< , and *,/,% there is no
the translator doesn’t optimize anything, but you can do it by hand
So you There's no fuss about the fact that it's good for nothing, I threw the demo
its size is 40 kb, but that's because there's a lot of unnecessary stuff there and I didn't
optimize at all
the laser.a80 library, this is a library for connecting the PC110 with the LaserBasic core,
and there are also some othersfunctions like PRSTR and INTFUN
to avoid confusion, I’ll say right away that when closing a block you need to put
a semicolon, for example:
#list
main()
{
:kkk
int a,b;
a=3;
b=4;
a=a+b;
goto kkk;
}; ^^^if this semicolon is missing, there will be an error message
in general, this product does not pretend to be anything, but it can shut up those
whose hands are growing out of their ass and give them a CASE system.
PC110 is intended for those who need to quickly put together a large project from
many assembly subroutines. In general, smart people will appreciate it, but the opinion of fools
I don’t care.
Sincerely yours Igor
P.S. By the way, Andrey Savichev watched the broadcast and liked it.
From Vova Hex → To All 26 February 1998
Hi!
On 25 Feb 98 (20:53) you wrote something I decided to answer..
IM> It looks like someone managed to get a translator after all. I did not hope
IM> for this, and therefore did not insert any description. You need to broadcast
IM> like this: pc110 file.c file.a80
It’s easier this way.. But it still behaves strangely without specifying the output file
or when encountering '/?'..
IM> So that you don’t fuss about the fact that it’s good for nothing, I threw
IM> a demo, its size is 40 kb, but that’s because there’s a lot of stuff there superfluous and I haven’t
IM> optimized
Such a demonstration of capabilities....
IM> laser.a80 library, this is a library for connecting PC110 with the
IM> LaserBasic core, as well as some other functions like PRSTR and
IM> INTFUN
That is, how does Laser Basic also participate in the program? In addition, since there is
the main source code, we also need libraries so that you can try to play with
the program.. Now, in order to try it out, you need to write the program yourself from
scratch...
IM> so that there is no confusion, I’ll say right away that when closing a block you need
IM> to put a semicolon, for example:
IM> #list
IM> main()
IM> {
IM> :kkk
IM> int a,b;
IM> a=3;
IM> b=4;
IM> a=a+b;
IM> goto kkk;
IM> }; ^^^if there is no semicolon, then there will be a message abouterror
Well, we'll still endure this..
IM> in general, this product does not pretend to be anything, but it can shut
IM> the mouth of those whose hands are growing out of their ass and give them a CASE system.
What a subtle hint...
IM> PC110 is intended for those who need to quickly put together a large project
IM> from many assembly subroutines. In general, smart people will appreciate it, but
IM> I don’t care about the opinion of fools.
Well, thank you for your kind words..
IM> P.S. By the way, Andrey Savichev watched the broadcaster and liked it.
Especially, probably, the “CASE system”?
From Vyacheslav Mednonogov → To All 27 February 1998
Get Msg, Vova!
25 Feb 98 07:42, Vova Hex reported to Igor Maznitsa about {About PC110}:
VH> kit) it turned out that it needs to be redirected (pc110 file.c > file.a80).
VH> 1 errors in compilation. -- but you can’t specify it?
VH> and “Open output failer”...
This, apparently, is all connected. I guessed that it should be like this:
pcc110 input_file output_file
, then there will be no errors in the example (and the process will go _very_ quickly).
VH> It would be nice to comment on them.
And it would be nice (as an option) to insert pieces of the source program in the form of
comments to see how things were broadcast.
VH> File laser.a80 missing...
Judging by the names of the functions, a set of sub-laser BASIC should be linked.
By the way, a counter question to the author, where and how the parameters are passed (those in
brackets)
VH> In general, it was not possible to try this miracle (subject) ..
Doc would also like to know which commands can be used and which cannot; what
restrictions. But the speed of the broadcast is worthy of respect.
Warm greetings, Slava!
From Vyacheslav Mednonogov → To All 27 February 1998
Get Msg, Igor!
25 Feb 98 20:53, Igor Maznitsa reported to Vova Hex about {Re: About PC110}:
IM> in terms of commands, it’s the spitting image of microSI (or rather, it is microSI)
Where do they write about it? (it’s better here :))
IM> #list - this command includes in the assembly file
IM> lines from the C program
Oh!
IM> there is -,+,--,++,>>,<< , but *,/,% not
All expressions with no more than two operands, without parentheses (judging by
the source of the game)?
IM> translator it doesn’t optimize anything, but it can be done by hand
Bullshit, next. you can make a version :)
IM> LaserBasic, as well as some other functions like PRSTR and INTFUN
How does the translator decouple from parameter types - how does it know when
char, when int, and when *сhar? Are reference parameters allowed (type
&variable)? And where does it pass these parameters?
By the way, it looks like the function can be accessed before its description (without
announcement)?
IM> to avoid confusion, I’ll say right away that when closing a block you need to put
IM> a semicolon, for example:
From Vyacheslav Mednonogov → To All 27 February 1998
VH> Well, then, when it came to assembly, it turned out that it was full of
VH> such commands:
VH> === Cut ===
VH> LD BC,(c)
VH> INC BC
VH> LD (c),BC === Cut ===
VH> And the assembler, naturally, does not digest them.. It does thinks that this is
VH> register C. Then all sorts of lines like
Ha, Vova, so you got it (with a modification of the assembler :). Register
The big one, and this is the small one! Everything is according to the gens4 standard (or don’t use
variables named after register names at all)
Warm greetings, Slava!
From Igor Maznitsa → To All 27 February 1998
IM>> INTFUN
VH> That is, how does Laser Basic also participate in the program? In addition, since
VH> there is already a main source, libraries are also needed so that you can
VH> try to play with the program.. Now, in order to try it out
VH> you need to write the program yourself from scratch...
The laserbasic core is not my product, but HOME VIDEO GAMES Ent. and all questions regarding
purchase to them (I once wrote about this product and they told me that they say
what year I live)
Sincerely yours Igor
From Igor Maznitsa → To All 27 February 1998
VM> How does the translator decouple from the types of parameters - how does it know
VM> when it is char, when it is int, and when it is *char? Are reference parameters valid
VM> (type &variable)? And where does it pass these parameters?
VM> By the way, the function can be accessed before its description (without
VM> pre-declaration)?
it works with links (see the generated file), the parameters are passed through the
stack with an offset, and the return is carried out in the BC register
here is an example from the same library laser.lib:
=== Cut ===
AT (x,y)
int x,y;
{
#asm
LD A,(IY+6)
CALL 3742
LD A,(IY+8)
ADD A,L
LD L,A
LD (23684),HL
#endasm
}
PKEY()
{
#asm
LD BC,#F7FE
LD A,#FF
IN D,(C)
AND D
LD B,#FB
IN D,(C)
AND D
LD B,#FD
IN D,(C)
AND D
LD B,#FE
IN D,(C)
AND D
LD B,#EF
IN D,(C)
AND D
LD B,#DF
IN D,(C)
AND D
LD B,#BF
IN D,(C)
AND D
LD B,#7F
IN D,(C)
AND D
LD B,0
CPL
LD C,A
#endasm
}
=== Cut ===
From Vova Hex → To All 27 February 1998
VH>> And the assembler, naturally, does not digest them.. He thinks that this is
VH>> register C..
VM> Ha, Vova, so you got it (with a modification of the assembler :).
Yeah, and all in vain - now we will write in C.. :))
VM> Register C is big, and this is small! Everything is according to the gens4 standard (or
VM> do not use variables named by register names at all)
By the way, he compiled the only line “main(){int c;c++;}” as
=== Cut ===
_main
PUSH HL
PUSH IY
LD HL,00
ADD HL,SP
LD IY,00
ADD IY,SP
EXX
LD HL,0
ADD HL,SP
LD BC,2
OR A
SBC HL,BC
LD SP,HL
EXX
PUSH HL
PUSH DE
LD DE,0
OR A
SBC HL,DE
PUSH HL
POP BC
POP DE
POP HL
PUSH BC
PUSH HL
PUSH BC
POP HL
LD C,(HL)
INC HL
LD B,(HL)
POP HL
INC BC
POP DE
LD A,C
LD (DE),A
INC DE
LD A,B
LD (DE),A
DEC DE
DEC BC
LD SP,IY
POP IY
POP HL
RET
=== Cut ===
:-? But it's not scary. I wonder how he will behave with tagsmore than
six characters long.. Also interesting is the reaction to the c-- command outside the block.. In general
an interesting compiler. :))
From Dmitry Grigoryev → To All 1 March 1998
Hello, Igor!
Friday February 27, 1998 21:03, Igor Maznitsa wrote to Vova Hex:
[missed...]
IM> The laserbasic core is not my product, but HOME VIDEO GAMES Ent. and all
IM> questions about purchasing them (I once wrote about this product and
Frivara to me a long time ago, most likely.
IM> they said that they say what year I live)
And that, since that time, this kernel has become faster? Have you optimized it or what? There's something I didn't notice, judging by what your compiler produces... A good
program, but the output code is very dirty. How is this better than the usual
use of already known and moss-covered BASIC, C, Pascal compilers?
Is it really possible that the code produced under hi-soft C is worse or does it support fewer operators?
IM> Sincerely yours Igor
Sincerely, Dmitry (OLDMAN).
ZXNet: 095/100.1
old...@i-connect.ru
From Vyacheslav Mednonogov → To All 2 March 1998
IM> to make optimization easier, and libraries can be created
If you have to modify the source many times, then just as many times
you will have to manually optimize the translated file (in fact, do the same
same job)
Warm greetings, Slava!
From Vyacheslav Mednonogov → To All 2 March 1998
Get Msg, Vova!
27 Feb 98 19:37, Vova Hex reported to Vyacheslav Mednonogov about {About PC110}:
VH> By the way, he compiled the only line "main(){int c;c++;}" as
VH> === Cut ===
VH> _main
VH> PUSH HL
VH> PUSH IY
/skip/
Yes, it’s strange that main is translated as a regular function. IMHO, for spec
it would be possible to limit it to: _main ENT $. Apparently this was done with an eye to a
normal OS (such as isDOS)...
By the way, here the second flaw is visible: even in the absence of transmitted
parameters inside the function, it is still pretended that they exist. But Igor
warned that the translator is not optimizing.
Warm greetings, Slava!
From Roman Petrov → To All 7 March 1998
Optimize 70 kilobytes of assembly text. It won’t seem like much :(
IM> So that you don’t go crazy about the fact that it’s good for nothing, I threw
IM> a demo, its size is 40 kb, but that’s because there’s a lot of unnecessary stuff there and I
IM> didn’t optimize anything
Yeah, I especially liked the process of assigning text in main() - cool!
(meaning how it was translated)
IM> P.S. By the way, Andrey Savichev looked at the translator and liked it.
By the way, I also liked it, but if I could finish it, it would be great
I’ll just put together all my wishes:
- make for loops
- sharpen the translator to. improved asm80 (so that you can use variables like
c, b, a).
- try to make * and /.
- make at least some kind of optimizer.
With respect, Roman aka Megus of Brain Wave corp.
[Team ZX-Spectrum] [Team Agatha Christie] [Team Metallica] [Team Iron Maiden]
... Or are you unforgiven too?
From Rick Murray → To All 16 March 1998
get hurt! :):)
IM> subroutines. In general, smart people will appreciate it, but I don’t care about the opinion of fools.
yes...
Bye!
Rick Murray
mur...@geocities.com http://letit.home.ml.org ICQ:6653886