SjASM v0.39b

by sjoerd on 12-03-2004, 09:52
Topic: Development
Languages:

There's a new release of SjASM, the xl2s Z80 cross assembler.

New since version 0.39:

  • Structures.
  • dword, rept and endmodule directives.
  • text/code/data/pool were removed since they didn't quite work the way they should.

Relevant link: www.xl2s.tk

Comments (60)

By msd

Paragon (1457)

msd's picture

12-03-2004, 11:24

Great work on the structure stuff. I really like it

By anonymous

incognito ergo sum (116)

anonymous's picture

12-03-2004, 14:36

Why do I have the distinct feeling this is ALPHA software, not beta?
I think everybody who is using this is very courageous, really.

By anonymous

incognito ergo sum (116)

anonymous's picture

12-03-2004, 15:03

Also, I don't understand what all the raving is about regarding structures... tniASM has been able to do this exact same thing for years!

The 'manual' is filled with errors and mistakes...

Sorry for complaining, but there's some seriously false advertising here...

By sjoerd

Hero (602)

sjoerd's picture

12-03-2004, 15:18

Why do I have the distinct feeling this is ALPHA software, not beta?
- The version number maybe?

I think everybody who is using this is very courageous, really.
- There are many brave people.

Also, I don't understand what all the raving is about regarding structures... tniASM has been able to do this exact same thing for years!
- Not the exact thing. And I was somewhat reluctant to implement this, because my first (and secondSmile reaction was: SjASM has been able to do this exact thing for years!

The 'manual' is filled with errors and mistakes...
- Yes, I should rewrite that. But in the meantime you can always rtfs. (OK, which is of course (IYHO) ‘full of errors and mistakes’.)

Sorry for complaining, but there's some seriously false advertising here...
- Complain what you want. However, there is no false advertising IMO.

By Arjan

Paladin (719)

Arjan's picture

12-03-2004, 16:32

ok I tried to port the Bombaman sources to sjasm format. I spend most of the time rewriting the macros, and also some constants that are put between double quotes in GEN80 but between single quotes in sjasm. Shouldn't be too much work to accept "" too.

I also found some bugs in the macro handling. If I have the following macro:
MACRO LDNZ REG,VALUE
jr z,.skip
ld REG,VALUE
.skip:
ENDM

and then use it like 'LDNZ (hl),a' I get an error 'label not found: a'

By Arjan

Paladin (719)

Arjan's picture

12-03-2004, 16:59

oh and this 'LDZ a,(player_special)' resulted in the error 'Bytes lost'

By sjoerd

Hero (602)

sjoerd's picture

12-03-2004, 17:12

ok I tried to port the Bombaman sources to sjasm format. I spend most of the time rewriting the macros, and also some constants that are put between double quotes in GEN80 but between single quotes in sjasm. Shouldn't be too much work to accept "" too.
- That doesn't look like much work indeed.

I also found some bugs in the macro handling. If I have the following macro:
MACRO LDNZ REG,VALUE
jr z,.skip
ld REG,VALUE
.skip:
ENDM
and then use it like 'LDNZ (hl),a' I get an error 'label not found: a'
- That's because '(' and ')' are used to make it possible to include comma's in arguments, like:
MACRO bytes HOI
BYTE HOI
ENDM
bytes (1,2,3,4)
which expands to:
BYTE 1,2,3,4
May be not the best way to do it...
You could use your macro like this: 'LDNZ [hl],a'.

By sjoerd

Hero (602)

sjoerd's picture

12-03-2004, 17:16

oh and this 'LDZ a,(player_special)' resulted in the error 'Bytes lost'
- LDZ a,[player_special]

By anonymous

incognito ergo sum (116)

anonymous's picture

12-03-2004, 22:20

The version number is 0.39b...
b is generally used as BETA.
Otherwise where do you think version numbers start being beta? From 1.0? Because normal people see 1.0 as a finished product.

By sjoerd

Hero (602)

sjoerd's picture

13-03-2004, 00:08

The version number is 0.39b...
b is generally used as BETA.
Otherwise where do you think version numbers start being beta? From 1.0? Because normal people see 1.0 as a finished product.
- I never thought about it that much. 0.39b is just the second 'improvement' of 0.39.
Was RS232a an alpha version? rs232b beta? and what's rs232c then?
I don't do alpha and beta. Only versions with known bugs and (newer versions) with unknown bugs Smile Like most software.
Starting at 1.0 for 'reliable' software makes sense.
Sorry about the confusion.

By anonymous

incognito ergo sum (116)

anonymous's picture

13-03-2004, 01:37

- That's because '(' and ')' are used to make it possible to include comma's in arguments, like:
MACRO bytes HOI
BYTE HOI
ENDM
bytes (1,2,3,4)
which expands to:
BYTE 1,2,3,4
May be not the best way to do it...

Indeed not. Especially since I think using (hl) as a macro argument is/would be used more often than arguments with comma's in them. Maybe you could use { and } to allow comma containing arguments?

By anonymous

incognito ergo sum (116)

anonymous's picture

13-03-2004, 01:50

Also, I don't understand what all the raving is about regarding structures... tniASM has been able to do this exact same thing for years!

I think it's going to be pretty hard for Sjoerd to come up with stuff that hasn't been around in other assemblers (be it Z80- or others) for ages. The raving is just about the fact that for people who use SjASM as their preferred Z80 cross-assembler some things have gotten a whole lot easier/neater.

By anonymous

incognito ergo sum (116)

anonymous's picture

13-03-2004, 02:08

Why do I have the distinct feeling this is ALPHA software, not beta?
I think everybody who is using this is very courageous, really.

Most of the bugs I've heard of over the last couple of months were
a) really features (like for example the macro thingy which doesn't accept (hl) as it uses brackets for comman-containing arguments in macros)
b) some error not being checked for. That is to say, somebody doing something (in the z80 assembly code) that they're not supposed to do and rather than detect and report it, sjasm would generate incorrect code.

Also, much to the credit of Sjoerd, bugs tend to get fixed relatively soon after they've been reported to him, sometimes even within hours! New features of course always have a higher chance of containing some bugs, but the more people at least try out those new features the sooner any bugs in them will be discovered and fixed.

Anyway, call it alpha or call it beta, but I really don't have any problems using SjASM.

By anonymous

incognito ergo sum (116)

anonymous's picture

13-03-2004, 02:12

Your point is valid.
I'm actually mostly referring to one person... Ah well, I shouldn't get worked up over this anyway.
I'm just a bit bitter as I'm sitting on something so much better than anything out there, but unable to release it in the state it's in. OTOH, buggy code doesn't seem to stop sjoerd from releasing anything... Maybe I should learn from that and change my principles Tongue

By sjoerd

Hero (602)

sjoerd's picture

13-03-2004, 05:14

Your point is valid.
I'm actually mostly referring to one person... Ah well, I shouldn't get worked up over this anyway.
- If you are just referring to me, use something like xl2s at wxs.nl.

I'm just a bit bitter as I'm sitting on something so much better than anything out there, but unable to release it in the state it's in.
- That's your choice. Look at it this way: you are keeping something much better from us, forcing me to create my own assembler, because there isn't something else.
And of course, I doubt it will be that much better... ~8) But if it is, I'll be happy to use it.

OTOH, buggy code doesn't seem to stop sjoerd from releasing anything... Maybe I should learn from that and change my principles Tongue
-A lot of bug reports I got were things I would have never found on my own, just because everyone uses another programming style. Take the 'macro-bug' of arjan. I could have waited 10 years with the release, but I would never have found this bug, just because I don't use macro's that way. (It's a bug because LDNZ ((hl)),a should have worked, of course).
But I don't think you should release buggy code. Don't let me change your principles. It's just that SjASM is in constant development as long as I use it myself, and if I fix a bug (or some more) and add some 'new' features, I release a new version.
Most of the time with new releases of SjASM, I didn't knew were the bugs would be... If you know where the bugs are, you should fix them.

Looking at the download/bug report ratio there are quite some people using SjASM without many problems.

And I am pretty sure tniASM doesn't support structures the way SjASM does ;-)

By anonymous

incognito ergo sum (116)

anonymous's picture

13-03-2004, 14:07

Sjoerd wrote: "If you are just referring to me, use something like xl2s at wxs.nl."

I wasn't.

By pitpan

Prophet (3137)

pitpan's picture

14-03-2004, 16:06

"Mine is better but I cannot publish it". "I assure that it does this and that, but I cannot distribute it". Stop it Guyver! This is exactly what you were critizising in the "New game" thread. TNIasm is a good product but the public version is, at the moment, old-fashioned and it cannot resist the comparisson with SjASM. Accept it.

We all look forward to get the next release of TNIasm with the full macro support. But until then, do not deny the facts. It is not a final release, we all know that, but hey, no pain no gain. I will test it with my sources.

By anonymous

incognito ergo sum (116)

anonymous's picture

14-03-2004, 17:26

HAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAAAAAHAHAAHAHAHAHHAAAHAHAHAHAAA!!!

By anonymous

incognito ergo sum (116)

anonymous's picture

14-03-2004, 17:47

It's always nice to gang up on someone, huh...

You might call tniASM old-fashioned, but it's more powerful than many of the cross-assemblers out there, even without macros.

Maybe I will not even release a new tniASM, because my ideas and features will just be stolen again and then people will say "your product is inferior and old-fashioned."

Besides, I did not come here to say tniASM is superior or anything, I'm just criticising Sjasm for being buggy, having a poor manual, and removing features just like that (Hell, FIXING a problem is a lot harder than removing the entire thing huh?!).
I'm also complaining about people applauding Sjasm for features that have existed in released tniASM versions for almost 4 years.

I also wonder what happened to Realfun and the claims sjoerd made about that.

By BiFi

Enlighted (4348)

BiFi's picture

14-03-2004, 18:46

In the past few months I have seen more SjASM updates than tniASM updates. This can mean two things. Either tniASM has simply too little number (or simply none) of annoying bugs or SjASM has quite many annoying bugs. I think it's quite strange to simply remove features having too many bugs right now in stead of fixing them.

By sjoerd

Hero (602)

sjoerd's picture

14-03-2004, 21:19

GuyveR800 said:
Maybe I will not even release a new tniASM, because my ideas and features will just be stolen again and then people will say "your product is inferior and old-fashioned."
Sjoerd says:
I’ll ‘steal’ every good idea. If I see a feature I like, why not implement it? As if you would think: hey, that’s a cool feature, too bad I can’t include it because it has been done before.
Aren’t you one of those against software patents, btw?

GuyveR800 said:
Besides, I did not come here to say tniASM is superior or anything, I'm just criticising Sjasm for being buggy, having a poor manual,
Sjoerd says:
By criticising other assemblers you are, as author of tniASM, sort of implying your product is better.

GuyveR800 said:
and removing features just like that (Hell, FIXING a problem is a lot harder than removing the entire thing huh?!).
Sjoerd says:
Dunno, I didn’t even try to fix it. I will look into it.

GuyveR800 said:
I'm also complaining about people applauding Sjasm for features that have existed in released tniASM versions for almost 4 years.
Sjoerd says:
TniASM doesn’t support structures they way SjASM does now. Speaking of false advertisement…

GuyveR800 said:
I also wonder what happened to Realfun and the claims sjoerd made about that
Sjoerd says:
Realfun isn’t anywhere near a release at the moment. It should be in a (somewhat;-) finished state before its release.

BiFi said:
In the past few months I have seen more SjASM updates than tniASM updates. This can mean two things. Either tniASM has simply too little number (or simply none) of annoying bugs or SjASM has quite many annoying bugs. I think it's quite strange to simply remove features having too many bugs right now in stead of fixing them.
Sjoerd says:
It could mean two things, you said. You named only one.
I think the new feature (yes, the structures) is interesting enough to release a new SjASM without the removed features, since I guess not that many people were using that anyway (including myself;-)
And besides, fyi, all reported bugs were fixed. And not every update was a bug fix (even though about every update states ‘and some (minor) bugfixes’, even when there were no fixes at all… I honestly don’t know of that many bugs in SjASM 0.39b at the moment, although the ones I know about are pretty stupid~8^)

Anyway have fun with SjASM or don’t. I know there are people using it, and although I wrote it for myself, it’s for them I put it online. Not for the people who complain about it because they prefer another assembler…

By anonymous

incognito ergo sum (116)

anonymous's picture

14-03-2004, 21:30

Sjoerd wrote:
"I’ll ‘steal’ every good idea. If I see a feature I like, why not implement it? As if you would think: hey, that’s a cool feature, too bad I can’t include it because it has been done before.
Aren’t you one of those against software patents, btw?"

Yes, and I also believe in giving credit where credit is due.

"By criticising other assemblers you are, as author of tniASM, sort of implying your product is better."

'sort of' doesn't mean I am, it means you think I am.

"TniASM doesn’t support structures they way SjASM does now. Speaking of false advertisement…"
According to your manual and the reports of some of your users, Sjasm doesn't offer any extra functionality in that department. Maybe you could explain exactly what makes Sjasm superior in the 'structures' department.

By BiFi

Enlighted (4348)

BiFi's picture

14-03-2004, 21:37

you can extrapolate the second from the first Wink

By sjoerd

Hero (602)

sjoerd's picture

14-03-2004, 22:28

GuyveR800 wrote:
"Yes, and I also believe in giving credit where credit is due."

I don't see you giving any credit to others involving features in tniASM.

"According to your manual and the reports of some of your users, Sjasm doesn't offer any extra functionality in that department. Maybe you could explain exactly what makes Sjasm superior in the 'structures' department."

IMHO SjASM has always been superior in this department. Not that there is anything possible that's not possible with tniASM (or any other assembler), it's just easier or faster.

example:

org 5000h

struct chan
volumereg byte
freqreg byte
lastfreq # 2
; more channel variables
ends

channels:
chan 50h,38h
chan 51h,39h
; etc

Or:
struct scolor
red byte 1
green byte 3
blue byte 5
ends

color1 scolor 1,2,3
color2 scolor ; using defaults

Listfile:
---------------
01 0000 org 5000h
02 5000
03 5000 struct chan
04 5000~ volumereg byte
05 5000~ freqreg byte
06 5000~ lastfreq # 2
07 5000~ ; more channel variables
08 5000 ends
09 5000
10 5000 channels:
11 5000 50 38 00 00 chan 50h,38h
12 5004 51 39 00 00 chan 51h,39h
13 5008 ; etc
14 5008
15 5008 Or:
16 5008 struct scolor
17 5008~ red byte 1
18 5008~ green byte 3
19 5008~ blue byte 5
20 5008 ends
21 5008
22 5008 01 02 03 color1 scolor 1,2,3
23 500B 01 03 05 color2 scolor ; using defaults

value label
-------- - -----------------------------------------------------------
00000004 chan
00000000 chan.volumereg
00000001 chan.freqreg
00000002 chan.lastfreq
00005000 channels
00005008 Or
00000003 scolor
00000000 scolor.red
00000001 scolor.green
00000002 scolor.blue
00005008 color1
00005008 color1.red
00005009 color1.green
0000500A color1.blue
0000500B color2
0000500B color2.red
0000500C color2.green
0000500D color2.blue

You tell me how to create those offset labels and those datastructures in tniASM.

By sjoerd

Hero (602)

sjoerd's picture

14-03-2004, 22:31

Woow. Not made to paste code into :-)

By anonymous

incognito ergo sum (116)

anonymous's picture

14-03-2004, 23:09

Sjoerd wrote:
"I don't see you giving any credit to others involving features in tniASM."

Who should I give credit for all the standard assembler features?
tniASM pioneered a lot of concepts and ideas, I can't credit anyone for them but myself.

"You tell me how to create those offset labels and those datastructures in tniASM."

It takes a small amount of extra typing, but it's possible without much hassle. Just read the manual, it clearly states how.

The only thing tniASM doesn't do is use the structure as a definition template. This feature was not explained well in the manual, so forgive me for missing it. Besides, it's only useful in static structures anyway, so hardly worth the trouble as most structures are dynamicly allocated.

By sjoerd

Hero (602)

sjoerd's picture

14-03-2004, 23:56

GuyveR800 wrote:
"Who should I give credit for all the standard assembler features?
tniASM pioneered a lot of concepts and ideas, I can't credit anyone for them but myself."

If you think I should credit you for any feature SjASM has, you know how to contact me. (Yes, I think you tried to let me think you tried to imply I stole all your concepts.)

"It takes a small amount of extra typing, but it's possible without much hassle. Just read the manual, it clearly states how."
It doesn't clearly states how. Something with rb/rw, but what about the program location counter thing?

"The only thing tniASM doesn't do is use the structure as a definition template. This feature was not explained well in the manual, so forgive me for missing it. Besides, it's only useful in static structures anyway, so hardly worth the trouble as most structures are dynamicly allocated."

So, basically you're saying tniASM and SjASM have the same 'structure' features, but the SjASM syntax is shorter and clearer, and SjASM has some additional possibilities. Meaning SjASM is superior.

By anonymous

incognito ergo sum (116)

anonymous's picture

15-03-2004, 00:15

Hey, if you want to proclaim Sjasm being superior to tniASM... Just note that I never called tniASM superior to any other assembler.

About Sjasm's support for structures, it's more of a high level language thing than an assembler feature, IMO. Not that there's anything wrong with that, but it's a matter of preference (like msd's use of macro's is insane to some people).

As for your program counter question, how about using PHASE for that? So in stead of STRUCT and ENDS you use PHASE and DEPHASE! Whoaaaaa

By msd

Paragon (1457)

msd's picture

15-03-2004, 08:57

GuyveR800 Says: About Sjasm's support for structures, it's more of a high level language thing than an assembler feature, IMO. Not that there's anything wrong with that, but it's a matter of preference (like msd's use of macro's is insane to some people).

haha.. insane of marco usage.. I use about 5. What is the legal limit?? Smile

Btw structs doesn't make it a high level language , it simply automaticly generates offsets. It doesn't create code or something.

By BiFi

Enlighted (4348)

BiFi's picture

15-03-2004, 09:17

About assembler superiority: you should leave that decission to the developers who are using it, have the time to compare it with each other. Every developer who makes his own assembler thinks his assembler is superior to (all?) other assemblers, just because they made it themselves. Some people just say their assembler is the best (even though this is highly debateable), others keep silent about that.

By sjoerd

Hero (602)

sjoerd's picture

15-03-2004, 12:42

Aaauw. This is being too much fun.

GuyveR800 wrote:
"Hey, if you want to proclaim Sjasm being superior to tniASM... Just note that I never called tniASM superior to any other assembler."

You asked me to explain what made SjASM superior in the 'structure department'. So I tried to do that. I should have said: 'Meaning SjASM is superior in the 'structures' department.' Are you trying to be smart, or do you really not understand that? Please understand English is not my first language, so I might not be very clear in it. (whahaa. I just proved my point, didn't I?) I thought the context was clear enough.

"About Sjasm's support for structures, it's more of a high level language thing than an assembler feature, IMO. Not that there's anything wrong with that, but it's a matter of preference (like msd's use of macro's is insane to some people)."

What makes you think we disagree here?

"As for your program counter question, how about using PHASE for that? So in stead of STRUCT and ENDS you use PHASE and DEPHASE! Whoaaaaa"

That's great. But I think I'll use struct/ends or map for that.

By sjoerd

Hero (602)

sjoerd's picture

15-03-2004, 12:51

Bifi wrote:
"About assembler superiority: you should leave that decission to the developers who are using it, have the time to compare it with each other."

As if I could make such decisions.

"Every developer who makes his own assembler thinks his assembler is superior to (all?) other assemblers, just because they made it themselves."

How do you know that? Did you make an assembler, and did you think it's the best or something?

"Some people just say their assembler is the best (even though this is highly debateable), others keep silent about that. "

I hope you're not suggesting I am saying SjASM is the best (because I am not, and I never will), and guyver is keeping silent :-)

By anonymous

incognito ergo sum (116)

anonymous's picture

15-03-2004, 14:05

Sjoerd wrote: "What makes you think we disagree here?"

What makes you think everything I say is a disagreement with something you?

By BiFi

Enlighted (4348)

BiFi's picture

15-03-2004, 16:39

So, basically you're saying tniASM and SjASM have the same 'structure' features, but the SjASM syntax is shorter and clearer, and SjASM has some additional possibilities. Meaning SjASM is superior.You never said SjASM isn't superior? Then one of us needs his eyes checked...

I rest my case...

By sjoerd

Hero (602)

sjoerd's picture

15-03-2004, 17:16

BiFi wrote:
"You never said SjASM isn't superior? Then one of us needs his eyes checked..."

Sjoerd wrote:
"You asked me to explain what made SjASM superior in the 'structure department'. So I tried to do that. I should have said: 'Meaning SjASM is superior in the 'structures' department.' Are you trying to be smart, or do you really not understand that? Please understand English is not my first language, so I might not be very clear in it. (whahaa. I just proved my point, didn't I?) I thought the context was clear enough."

Once again:
I should have said: 'Meaning SjASM is superior in the 'structures' department.', because that's what I meant.

Bifi Wrote:
"I rest my case..."

Who are you trying to convince anyway? And why do want me to say SjASM is superior? I get the impression some people, including you, are trying very hard not to understand me. That's kinda stupid, IMHO.

By snout

Ascended (15184)

snout's picture

15-03-2004, 18:58

Fact is: there are several Z80 ASM compilers out there. Some for MSX, some for PC. Some including complete IDE's, some being just a commandline compiler. There are similarities between all of them, and there are quite some with unique features as well. It's up to the Z80 coders to decide which one(s) they prefer and use. SjASM is one of them that gets regularly updated, and anyone is free to give it a try and to like it, or not. tniASM is another fine assembler, and a source of inspiration for SjASM, which has proven its power in the past, and has got some interesting updates coming up. I think we'll have to have a little more patience to see those in action though. I for one am looking forward to it Smile

By pitpan

Prophet (3137)

pitpan's picture

15-03-2004, 19:46

I disagree with everybody: my own never-released assembler is much better!!!!! ;-)
And sooner or later it will become Z80 compatible!!! Just kidding.

But now, seriously: I think that there are more Z80 assemblers out there than MSX asm programmers. Could we check it with a poll in MRC? Perhaps just 4 lines in asm and choose different interpretations. Because everybody says "YES, I KNOW ASM. BUT I PREFER BASIC.". Just a simple test, just to know how many assembler-MSXers are out there.

By sjoerd

Hero (602)

sjoerd's picture

16-03-2004, 16:08

OK. Talked to some people about this. Let's see if they are right :-)

Bifi Wrote:
"In the past few months I have seen more SjASM updates than tniASM updates. This can mean two things. Either tniASM has simply too little number (or simply none) of annoying bugs or SjASM has quite many annoying bugs. I think it's quite strange to simply remove features having too many bugs right now in stead of fixing them."

Do you use tniASM? Never tried something like this:
LD BC,(256*10)+152
Try that with tniASM 0.4 and tell me that's not annoying.

Or the following:
KIP: EQU HOI
NOP
HOI: EQU ZOI
NOP
ZOI:
This doesn't work with SjASM because of the forward referencing, which tniASM claims to be able to handle. "I think everybody who is using this is very courageous, really."

I am quite certain the author of tniASM could give you more examples of bugs in the released versions of tniASM.

I never made a secret of the possibility of bugs in SjASM. If I know of a bug I publish it on my site, and I try to fix it. When I have fixed a bug, I want to release a new version of SjASM as soon as possible because I don't like the idea of having a fixed, 'good' version while people are still downloading a 'buggy' one.

By anonymous

incognito ergo sum (116)

anonymous's picture

16-03-2004, 17:07

You really want to turn this into a SjASM vs tniASM thing, don't you?

Do you use tniASM? Never tried something like this:
LD BC,(256*10)+152
Try that with tniASM 0.4 and tell me that's not annoying.

This is not a bug, but caused by the HACK that makes () equivalent to []. It's clearly documented as being a hack, and the 'problem' you describe is a clear consequence of this.
People asked for it, so I gave it to them.

LD BC,152+(256*10) or LD BC,+(256*10)+152 will solve this problem.

Or the following:
KIP: EQU HOI
NOP
HOI: EQU ZOI
NOP
ZOI:
This doesn't work with SjASM because of the forward referencing, which tniASM claims to be able to handle. "I think everybody who is using this is very courageous, really."

That's a very nicely fabricated piece of text. Too bad it's not a real-world situation huh? This problem only occurs when EQU'ing EQU's to eachother in a chain like this.
This is not really a bug, it's just tniASM trying to make as few passes as needed. As soon as all labels are known, it expects the last pass to be able to resolve all unknown values. This fails if chained EQU's are used.
I could release a new version in which an extra pass is made to double-check all EQU values, but again, this problem has never been reported by anyone. It's not a real-world situation.

What is it with you and chickens, btw?!

By Arjan

Paladin (719)

Arjan's picture

16-03-2004, 17:50

the last example isn't a bug either, it works perfectly fine!

By anonymous

incognito ergo sum (116)

anonymous's picture

16-03-2004, 18:13

Sjoerd wrote: "I am quite certain the author of tniASM could give you more examples of bugs in the released versions of tniASM."

Well, there is only one bug in tniASM I am aware of, and that's that the linenumber which is reported on errors on lines that end in an expression is one higher than should be.
I never felt it necessary to fix this bug, as it's just a minor inconvenience.

Anyway, the next version of tniASM contains a completely new parser which solves this problem.

By pitpan

Prophet (3137)

pitpan's picture

16-03-2004, 21:42

yyline does not work properly? Flex+Bison (or YACC), I guess...

By sjoerd

Hero (602)

sjoerd's picture

17-03-2004, 02:13

GUYVER800:
>>>You really want to turn this into a SjASM vs tniASM thing, don't you?

No. What makes you think that?

Btw: you are the one saying SjASM is buggy, based on the number of fixed bugs I suppose (which mostly weren't 'real' bugs, because they were the result of (1) a hack, or (2) no real-world situations, or (3) something that didn't supposed to work, or, OK, (4) a bug). Why would you do that? Please don't start saying I did begin all this, whatever it is...

>>>This is not a bug, but caused by the HACK that makes () equivalent to [].

OK. Now it's less annoying.

>>>LD BC,152+(256*10) or LD BC,+(256*10)+152 will solve this problem.

That's a workaround, not a solution.

>>>That's a very nicely fabricated piece of text. Too bad it's not a real-world situation huh? This problem only occurs when EQU'ing EQU's to eachother in a chain like this.

So, it's not a bug because this isn't a 'real-world situation'? It was similiar to the first program I used to try out tniASM. What would you think of an assembler that (1) doesn't give labels the right values and (2) isn't capable of informing the user of the right linenumber which supposedly contains the error?

>>>This is not really a bug, it's just tniASM trying to make as few passes as needed. As soon as all labels are known, it expects the last pass to be able to resolve all unknown values. This fails if chained EQU's are used.

Not a bug? With your definition of what a bug is, SjASM is bugfree since version 0.1. ;-)
If you can give a warning, why not do an extra pass in such cases?

>>>Well, there is only one bug in tniASM I am aware of, and that's that the linenumber which is reported on errors on lines that end in an expression is one higher than should be.

The line number is that of the next line with an instruction, or something like that. Empty lines are skipped. And shouldn't you put something like that in the manual or something, if you know of it?

>>>What is it with you and chickens, btw?!

Chickens rule. (Not that that's a good thing).

By sjoerd

Hero (602)

sjoerd's picture

17-03-2004, 12:09

Denying or ignoring bugs is easier than fixing them, huh?

GuyverR800:
>>>As for your program counter question, how about using PHASE for that? So instead of STRUCT and ENDS you use PHASE and DEPHASE! Whoaaaaa

I think you’d better have tried that before posting it here… phase and dephase don’t fix the problem.

org 8000h

nop ; lots of instructions

phase 0
wox: rw 2
woy: rw 2
dephase

GreatSubroutine:
nop ; lots of instructions
nop ; even more instructions
ret

Whoaaaaa :-)

Maybe I’m doing something wrong here, but I expected (well, not really) ‘GreatSubroutine’ to have a value of 8001 hex. Anyway, I don’t think you can replace struct/ends with phase/dephase that easily.

Hmm, this is getting stupid…

By pitpan

Prophet (3137)

pitpan's picture

17-03-2004, 12:19

Sjoerd: do not mind. Just continue developing your excellent assembler and ignore what Guyver says. If you need some help, perhaps I could help you. I have developed assemblers for Gameboy (pseudo Z80), 6502 (NES) and Z80 (MSX). And if you want to share good ideas, then mail Martin Korth, the author of NO$MSX. He is the one.

By Arjan

Paladin (719)

Arjan's picture

17-03-2004, 12:34

that piece of code gives exactly the result as it is supposed to do, just like the manual states. So if you want to use PHASE/DEPHASE/RB/RW for structures, just stick it to the end of the file, or do something like this:

org $0100

jp start

color: PHASE 0
.R: db 0
.G: db 0
.B: db 0
DEPHASE
.length: equ $-color

color_white: ds color.length,255

start: ld ix,color_white
ld a,(ix + color.R)
ret

Of course, it's not as neat as using structs, since you can't use color_white.R now. Then again, structures are usually accessed using IX/IY if you use multiple structure instances.

By anonymous

incognito ergo sum (116)

anonymous's picture

17-03-2004, 14:20

Sjoerd wrote:
"GUYVER800:
>>>You really want to turn this into a SjASM vs tniASM thing, don't you?

No. What makes you think that?"

Oh, just the fact that a moderator tried to put an end to this thread and you chose to ignore that and in stead started trying to find faults in tniASM.

You're acting quite childish and irrational now, making it impossible to have a decent discussion with, so I'm gonna do what I wanted to do a few days ago. This is my final message in this thread.

Maybe you can follow pitpan's advise and just ignore me. Coz my programs are just full of hidden bugs, and they're not impressive or anything anyway. You're so very right.
You and pitpan are much better programmers than me. Afterall, I just steal all my ideas from other people.
I should just go back and only do graphics and music, and once again leave the programming up to the real programmers. I'm such an idiot...

By pitpan

Prophet (3137)

pitpan's picture

17-03-2004, 15:25

Stop complaining, Guyver. As I said in the forum, you are an excellent programmer and I respect that. But you should be more humble and accept that other people, maybe, are also trying to do interesting things in the MSX scene.

By sjoerd

Hero (602)

sjoerd's picture

17-03-2004, 15:49

>>>Oh, just the fact that a moderator tried to put an end to this thread and you chose to ignore that and in stead started trying to find faults in tniASM.

So, if you say SjASM is buggy that's OK, but when I have some critism on tniASM, I'm ignoring moderators?
I didn't try to find faults in tniASM, I found them the very first time I tried tniASM. (I wanted to try out this forward referencing thing).

>>>You're acting quite childish and irrational now, making it impossible to have a decent discussion with, so I'm gonna do what I wanted to do a few days ago. This is my final message in this thread.

You shouldn't have posted anything here in the first place, all your reactions were childish and/or irrational. You screaming 'sjasm is buggy, the manual is crap'. What kind of discussion did you try to start with that?

>>>Maybe you can follow pitpan's advise and just ignore me. Coz my programs are just full of hidden bugs, and they're not impressive or anything anyway. You're so very right.

These are your words.

>>>You and pitpan are much better programmers than me. Afterall, I just steal all my ideas from other people.

You are really very frustrated by all this, aren't you? Btw- I don't like the way you're accusing me of stealing anything.

>>>I should just go back and only do graphics and music, and once again leave the programming up to the real programmers. I'm such an idiot...

Is that the way you look upon graphic and music artists?

Anyway, SjASM hasn't been downloaded as many times as the last couple of days, so I guess I have to thank you for that.

By sjoerd

Hero (602)

sjoerd's picture

17-03-2004, 16:35

Arjan wrote:
>>>that piece of code gives exactly the result as it is supposed to do, just like the manual states.

I know, but phase/dephase doesn't solve the problem I had with org.

Problem is that between phase and dephase the locationcounter will be increased. I should have made this clearer in my post, sorry. So you're example should be:

---
org $0100

jp start

color: PHASE 0
.R: rb 1 ; rb instead of db, we don't want to output anything
.G: rb 1 ; we just want to generate offsets
.B: rb 1
DEPHASE
.length: equ $-color
org color ; <-- correct program counter

color_white: ds color.length,255

start: ld ix,color_white
ld a,(ix + color.R)
ret
----

So phase/dephase have no use here. The following works just as well, and is shorter:
color: org 0
.R: rb 1
.G: rb 1
.B: rb 1
.length: org color

In 'old' SjASM code this would look like this:
color: map 0
.R # 1
.G # 1
.B # 1
.lenght #

By anonymous

incognito ergo sum (116)

anonymous's picture

17-03-2004, 17:20

Ok, one last reaction:
"You screaming 'sjasm is buggy, the manual is crap'. What kind of discussion did you try to start with that?"

I wasn't screaming. SCREAMING WOULD BE LIKE THIS!!!
Never heard of constructive criticism? I was hoping for a "ah yeah, you're right. I'll try to do something about it."
Apparently you don't care much for delivering dependable quality...

And as for your continuing critique on the forward references, they work PERFECTLY FINE in tniASM, except for the case of chained EQU's. Your inability to write a proper testcase is striking...

By anonymous

incognito ergo sum (116)

anonymous's picture

17-03-2004, 17:34

LOL!
I'm blind! You're blind!

Your chained EQU example works FINE in tniASM!!!
There's just a WARNING, not an ERROR. It compiles perfectly!

Thanks to Arjan for noticing this, coz I was too conf00sed to realize this.

ROFLMAO

By sjoerd

Hero (602)

sjoerd's picture

17-03-2004, 18:23

>>>Never heard of constructive criticism?

Yes, but I didn't recognize your remarks as such.

>>>I was hoping for a "ah yeah, you're right. I'll try to do something about it."

(1) The updates imply I am doing something about it.
(2) I've said I should rewrite the manual.
(3) You're not right.

>>>Apparently you don't care much for delivering dependable quality...

I do, hence the updates.

>>>And as for your continuing critique on the forward references, they work PERFECTLY FINE in tniASM, except for the case of chained EQU's.

What continuing critique? I said: hey, this is a bug. you said: no, it isn't. I said: I think it is. That's all. OK, and I said, I didn't go trying to find bugs in tniASM. You won't hear anything more on it from me. (Or so I thought:-)

>>>Your inability to write a proper testcase is striking...

It's not a proper testcase because it isn't real-world, right?

By sjoerd

Hero (602)

sjoerd's picture

17-03-2004, 23:33

GuyveR800 wrote:
>>>LOL! I'm blind! You're blind!

Really, what happend? ;-)

>>>Your chained EQU example works FINE in tniASM!!!

Are you sure about this? You really think I am stupid enough to say 'hey, this is not right', if I know you'll be ROFLYAO when I'm wrong? (Well, I am stupid enough for that, I know).

>>>There's just a WARNING, not an ERROR. It compiles perfectly!

If it compiles perfectly, why the warning? Wouldn't that be a bug?

Sjoerd quote:
----
Or the following:
KIP: EQU HOI
NOP
HOI: EQU ZOI
NOP
ZOI:
This doesn't work with SjASM because of the forward referencing, which tniASM claims to be able to handle. "I think everybody who is using this is very courageous, really."
----
I nowhere say the forward referencing goes wrong (It does go wrong, just read on), I was referring here to the warning I got. (something with a label on line 2, while line 2 only contains a 'nop'). But you already knew of that error.

>>>Thanks to Arjan for noticing this, coz I was too conf00sed to realize this.

It looks good because the labels don't get used. Your warning means that some labels in some specific cases got the wrong value.
Try this:
db h1
h1: equ h2
h2: equ h3
h3:

Yeah, just a warning. But don't worry it's not a real world situation.

>>>ROFLMAO

You may want to stand up now...

By anonymous

incognito ergo sum (116)

anonymous's picture

18-03-2004, 00:16

Are you too dumb to realize your new example is working fine too?

By anonymous

incognito ergo sum (116)

anonymous's picture

18-03-2004, 00:38

Ok, scratch that.. just checked the symbol table, and not the output.

The thing is, this is indeed not a real-world situation. Normally there would be extra code before and after that would make the assembler do 3 passes anyway. As I said, EQU's are a special case. EQU's are evil anyway.

The other thing is, you say the warning is a bug. But in fact it's a feature. The warning tells you to check the output, to see if it's what you intended. This is the exact purpose of warnings in C compilers and such too.

Regardless of this, you're still frantically trying to prove tniASM has bugs, but you keep running in circles... I think you're a maniac, and you had better used your time improving Sjasm.

Maybe at this point pitpan can come in and say "stop it, sjoerd!"
{small mod - didn't contribute to the discussion, nor to the atmosphere}

By pitpan

Prophet (3137)

pitpan's picture

18-03-2004, 07:24

Very polite, Patriek. Wait.

By pitpan

Prophet (3137)

pitpan's picture

18-03-2004, 11:17

Patriek Lesparre: I suggest you to retire what you have said in your last post here.
MRC moderators: please do not admit such things in these pages. I have been very polite until now. Please read carefully all my posts here. Different opinions are one thing; personal attacks are a different matter.
Please ban such behaviours in these pages.

By sjoerd

Hero (602)

sjoerd's picture

18-03-2004, 12:28

>>>The thing is, this is indeed not a real-world situation. Normally there would be extra code before and after that would make the assembler do 3 passes anyway.

I would check that before suggesting it here, if I were you. How much code do I have to paste before and after it to get more passes, and make this bug go away?

>>>As I said, EQU's are a special case. EQU's are evil anyway.

Why is it so hard for you to admit this is a bug? If it's a special case why isn't it in your manual?

>>>The other thing is, you say the warning is a bug. But in fact it's a feature. The warning tells you to check the output, to see if it's what you intended. This is the exact purpose of warnings in C compilers and such too.

So, why didn't you go check the output before going: 'it works perfectly'?
I didn't say the warning is a bug, I said the linenumber wasn't right. OTOH giving a warning while everything is fine, isn't really the way to go IMHO.
Problem here is: it goes wrong, tniASM detects it, and you say it's just a warning.

>>>Regardless of this, you're still frantically trying to prove tniASM has bugs, but you keep running in circles...

I am reacting here to people who think this works fine. (I was hoping for a 'ah yeah, you're right, I'll... ah, forget it :-)

>>>I think you're a maniac, and you had better used your time improving Sjasm.

Who's trying to make this into a tniASM vs. SjASM thing?

I'll ignore your last statement. But it's sad to see that many 'discussions' with you end up such way.

I think I found a bug, you think I didn't. Let's leave it at that.
The real problem here is you clearly don't have any respect for what I do.

By snout

Ascended (15184)

snout's picture

18-03-2004, 15:46

Okay, you have all said what you wanted/had to say now. I suggest we close this topic by now and keep future reactions only on the newspost topic, not on the discussion above from here on. Thank you for your co-operation Wink