It is currently Tue Oct 15, 2019 7:15 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Thu May 16, 2019 6:30 pm 
Offline
User avatar

Joined: Sun Sep 19, 2004 9:28 pm
Posts: 4210
Location: A world gone mad
My firm view is that no, the tool (assembler) should fail to assemble in the case it encounters a byte it cannot parse / is outside of allowed range.

Users, especially programmers, DO NOT like it when programs silently ignore things that cause problems or are invalid. The tool telling you "I can't deal with this; fix it!" is absolutely the way to go. Likewise, the tool (assembler) documentation should outline this fact by stating what its permitted byte range is for labels/values/whatever. (Decent software describes such things using what's called a BNF or ABNF -- you've probably seen at least one example in something somewhere, but they're common in RFCs. But it's perfectly OK to just say something like, for example: Labels must use alphanumeric and underscore bytes only (ASCII [0-9A-Za-z_]).)

Silent filtering of invalid data leads to an almost infinitesimal number of problem reports. Furthermore, failure to actually fix the problem (of invalid bytes/characters) in the code/file means that this file filled with issues can end up spreading from one person to the next via sharing file/code, resulting in a problem that would continue to exist throughout the rest of humanity's existence. (That got a little deep there, hahaha. Sorry. But it's actually quite true -- we're STILL dealing with aspects of this in other ways in computing today.)

That said: I certainly would agree that a vague/nebulous error message if invalid bytes/characters are used is not helpful. "Character/byte out of range", along with the hex value of the byte that was invalid and line number, are useful.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ]  Go to page Previous  1, 2

All times are UTC - 7 hours


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