Author Topic: Abrupt end of LST  (Read 13146 times)

Offline RuudB

  • Jr. Member
  • *
  • Posts: 40
  • Country: nl
    • Ruud's Commodore Site
Abrupt end of LST
« on: July 10, 2012, 08:24:05 PM »
Hello,

I'am assembling an ASM, no errors but the LST file is not complete: it stops in the middle of some comment. Weird thing: it is exactly 10,000 lines long. Is there anybody having just an idea what is going on?
Thank you!

Groetjes, Ruud Baltissen
www.Baltissen.org
With kind regards / met vriendelijke groet, Ruud Baltissen

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Abrupt end of LST
« Reply #1 on: July 10, 2012, 09:56:37 PM »
Hi Ruud,

Love your site! I never programmed a Commodore 64, but my first machine was a VIC-20 (literally out of a trash can) so the style is familiar. Thanks for the smile!

I can't think of anything that's special about 10,000 lines. If you add a dummy line, does it go to 10, 001? I have seen something a little like this. I was doing a "directory listing" and was using a single character to make a "->" to indicate a subdirectory - ascii 0x1A, as I recall. It was working fine until I added a comment which included this character. Unwisely, I made several changes at the same time. Suddenly, half my variables were "undefined! Took me a while to figure out that Nasm/DOS were using 0x1A as an EOF, so Nasm was stopping at that point. All from changing a comment!

Also, Nasm uses "[list +]" and "[list -]" to turn output to a .lst file on and off so you can do...
[/list][/list]
Code: [Select]
[list -]
%include "bigfat.inc"
[list +]

Perhaps Nasm is interpretting something as a "[list -]"? It could be something else (bug), but I suspect that you've "said something" that has offended Nasm. If all else fails, post a few lines...

This may be a good time to mention another character that can mess ya up if it occurs in a comment... the "line continuation character", "\", if it occurs in a comment (ascii art?) will cause the next line to be treated as part of the comment, sometimes causing code to mysteriously disappear. We try not to wreck existing code with changes to Nasm, but sometimes it happens. I don't think this one is part of your problem...

If you can't solve it, post more...

Best,
Frank

(this forum software is adding extra "list"s! Not a Nasm problem!)

[/list]

Offline TightCoderEx

  • Full Member
  • **
  • Posts: 103
Re: Abrupt end of LST
« Reply #2 on: July 11, 2012, 03:47:54 AM »
  but my first machine was a VIC-20 (literally out of a trash can)

Hope I'm not being too far out of line, commenting with a response that has nothing to do with the topic, but I couldn't resist as VIC 20 and Commodore, really shook up some cobwebs.  I still own 2 brand new VIC 20's, never been out of the box and a cassette drive for one.

Anyway, back to the listing crash  ???

Offline Bryant Keller

  • Forum Moderator
  • Full Member
  • *****
  • Posts: 360
  • Country: us
    • About Bryant Keller
Re: Abrupt end of LST
« Reply #3 on: July 11, 2012, 04:10:23 AM »
(this forum software is adding extra "list"s! Not a Nasm problem!)

The [list] and [/list] codes are special to SMF, they create a formatted list. A good rule of thumb is, if your text isn't in a code block and it includes square brackets around a word, wrap these in a nobbc block like I did above. Example:

Code: [Select]
[nobbc][list][/nobbc]
Will produce. [list]. Hope this helps.

About Bryant Keller
bkeller@about.me

Offline RuudB

  • Jr. Member
  • *
  • Posts: 40
  • Country: nl
    • Ruud's Commodore Site
Re: Abrupt end of LST
« Reply #4 on: July 11, 2012, 01:28:53 PM »
Hallo allemaal,
(hello everybody)

I checked for weird characters but couldn't find anything. Removing comment in the beginning of the file didn't change much:  I now see some code I couldn't see before but I'm still limited to 10,000 lines.

This ASM I'm working on is not my own and so I did a little experiment: I took one of my own files, in this case the latest version of my own XT BIOS and good for about 5300 lines in the LST file, and added about 6000 lines of comment at the beginning of the ASM. Surprise, surprise: same result, only 10,000 lines in the LST file; last part of the code missing. The generated BIN is exactly the same as before so no problems here.
I then placed the same block of comment at the end of the ASM. Same BIN and again a LST with only 10.000 lines. In this case the last part of the added comment wasn't visible.
IMHO this is something you can reproduce yourself very easy.

My question: is this a bug or feature? IMHO one of the programmers thought that 10,000 lines should be more then enough. But this mistake has been made before :)

Hope soon to hear from you!

And thanks for the comments on my site! You're always welcome to contact me in private if you have questions regarding your Commodores.

Groetjes, Ruud Baltissen
www.Baltissen.org
 
With kind regards / met vriendelijke groet, Ruud Baltissen

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Abrupt end of LST
« Reply #5 on: July 11, 2012, 04:15:34 PM »
I'm not seeing it, Ruud. Maybe my test file is too simple-minded. Just "nop" followed by "; this is comment 1"... 10010 of 'em. Just assembling as "-f bin", the .lst file appears complete. Nasm-2.10, platform is Linux (elderly kernel, but that "shouldn't" matter).

What am I missing?

Best,
Frank


Offline RuudB

  • Jr. Member
  • *
  • Posts: 40
  • Country: nl
    • Ruud's Commodore Site
Re: Abrupt end of LST
« Reply #6 on: July 12, 2012, 10:39:41 AM »
Hallo Frank,


Being at work right now I cannot upload anything so that has to wait until this evening. I will notify you.

 FYI: I'm using 2.10.01 under Windows XP. The file is assembled using the next command inside a BAT file:
     h:\ruud\nasm\nasm.exe %1.asm -f bin -l %1.lst -o %1.bik -Z error.txt
Nothing weird IMHO. The BIK file is turned into a BIN file by a program that calculates the checksum.


Groetjes, Ruud Baltissen
www.Baltissen.org
With kind regards / met vriendelijke groet, Ruud Baltissen

Offline RuudB

  • Jr. Member
  • *
  • Posts: 40
  • Country: nl
    • Ruud's Commodore Site
Re: Abrupt end of LST
« Reply #7 on: July 13, 2012, 05:16:29 AM »
Hallo allemaal,

Due to a problem at work I completely forgot to upload the files :(
I'll try to do it this evening.

Groetjes, Ruud
With kind regards / met vriendelijke groet, Ruud Baltissen

Offline RuudB

  • Jr. Member
  • *
  • Posts: 40
  • Country: nl
    • Ruud's Commodore Site
Re: Abrupt end of LST
« Reply #8 on: July 13, 2012, 08:55:22 PM »
Hallo allemaal,

The file causing me trouble can be found at http://www.baltissen.org/files/NIDE_RB.ASM or in the attachment.
I hope you find something :)

Groetjes, Ruud Baltissen
www.Baltissen.org
With kind regards / met vriendelijke groet, Ruud Baltissen

Offline Arq

  • Jr. Member
  • *
  • Posts: 9
Re: Abrupt end of LST
« Reply #9 on: July 13, 2012, 10:35:53 PM »
Here 2.10.01 nasm version under windows server 2003 the lst file seems complete:

1.09 MB (1,146,636 bytes)
SHA-1: A7137A6B0BFC0E17852EB707380E547BE53B20B2
« Last Edit: July 13, 2012, 10:38:53 PM by Arq »

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Abrupt end of LST
« Reply #10 on: July 13, 2012, 10:50:46 PM »
Thanks Ruud.

My "first try" also appears to generate a complete .lst file. I didn't use your complete command line, using Nasm-2.10 not 2.10.1 (I should update that anyway), not using XP... I'll experiment further and see what I can see...

Best,
Frank


Offline RuudB

  • Jr. Member
  • *
  • Posts: 40
  • Country: nl
    • Ruud's Commodore Site
Re: Abrupt end of LST
« Reply #11 on: July 14, 2012, 07:57:26 PM »
Hallo Frank,

I didn't use your complete command line, ....
That triggered me to run NASM directly from the command line and surprise...... things went well at my computer as well! So what is going on ???

To make a long story short: NASM is not to blame at all but I am. :-[

I still program in Turbo Pascal and have been using TASM from the moment it was available until september last year when I decide to switch to NASM. As said before, I run a BAT file where NASM is called. Not only NASM but also TASM because not all files have been converted to NASM. And beside running NASM/TASM it runs for example a checksum calculator for my BIOSes. It also runs a program that cleans the listings generated by TASM from those "page ends" needed when to print the listings. I use this program for already zillion years W/O any problem so far. And you may have already guessed, this program causes the shortening of LST file generated by NASM. But the most stupid thing: there is nothing, nothing at all in the program to shorten a listing to 10,000 lines ????? So I am completely flabbergasted. But that's my problem now, not yours :)

I only can apologize that I took your (and other ones) time for something that on the end was completely my fault. But I also thank you all for your time and patience!


Groetjes, Ruud Baltissen
www.Baltissen.org
With kind regards / met vriendelijke groet, Ruud Baltissen

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Abrupt end of LST
« Reply #12 on: July 15, 2012, 06:55:20 PM »
No apology necessary, Ruud. A beautiful piece of code, BTW! Glad it turned out not to be a "Nasm problem".

Thanks to Arq, and anyone else who even "thought about it". I'm pleased that we're developing a group here who will help other users with their problems!

I even learned to do  [list]  without confusing the Forum software!

Best,
Frank