minor "bug" in Max.asm and Rect.asm

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

minor "bug" in Max.asm and Rect.asm

Peter Dietrich
Hi everybody,

having completed writing the assembler in C++ on Windows XP using the mingw compiler just now, I wanted to announce their seems to be a minor glitch in these test files, maybe not:

In Max.asm: between lines 18 and 19 (instructions @0 and D=M), whatever causes the linebreak, it ist not detected by '\n' in C++.

Same thing in Rect.asm, but here it is between lines 11 and 12 (D;JLE and @counter).

If I replace the linebreak with an explicit push of the Enter-Button, everything works fine.

Luckily, with Pong.asm I didn't have this kind of issue.

But maybe this is all not true, and it's me, who does something quite not right, considering nobody else has experienced this.
Also I wanted to thank the authors for making this course available (in almost its entirety) to the public. Great work!

Peter
Reply | Threaded
Open this post in threaded view
|

Re: minor "bug" in Max.asm and Rect.asm

cadet1620
Administrator
Peter Dietrich wrote
Hi everybody,

having completed writing the assembler in C++ on Windows XP using the mingw compiler just now, I wanted to announce their seems to be a minor glitch in these test files, maybe not:

In Max.asm: between lines 18 and 19 (instructions @0 and D=M), whatever causes the linebreak, it ist not detected by '\n' in C++.

Same thing in Rect.asm, but here it is between lines 11 and 12 (D;JLE and @counter).

If I replace the linebreak with an explicit push of the Enter-Button, everything works fine.

Luckily, with Pong.asm I didn't have this kind of issue.

But maybe this is all not true, and it's me, who does something quite not right, considering nobody else has experienced this.
Also I wanted to thank the authors for making this course available (in almost its entirety) to the public. Great work!

Peter
I just looked at Max.asm and the line ending for line 18 (@0) is OK, however, it is the only non-comment line in the file that ends with spaces before the '\n'.  This might be your problem if you are expecting the '\n' immediately after the '0'.

This also makes sense if your code editor removes trailing white space.

--Mark
Reply | Threaded
Open this post in threaded view
|

Re: minor "bug" in Max.asm and Rect.asm

Peter Dietrich
Thanks, Mark. One bug less - in my program.

Petet