alberthdev / spasm-ng

SPASM-ng is a z80 assembler with extra features to support development for TI calculators.
GNU General Public License v2.0
97 stars 23 forks source link

spurious 'Skipping page N at user request' warning messages #86

Open bxparks opened 5 months ago

bxparks commented 5 months ago

Problem

The spasm binary seems to generate spurious messages for flash applications that consume multiple pages. They look like this: Warning: Skipping page 1 at user request. These messages which don't seem to mean anything, and don't do any harm as far as I can tell.

For example, here is the output of my app which currently consumes 3 flash pages:

$ make
 ../../spasm/spasm -I ../../spasm/inc -N rpn83p.asm rpn83p.8xk
Pass one... 
Pass two... 
------------------------------------------------
Beginning APP "RPN83P", courtesy of SPASM macros
------------------------------------------------
Warning: Skipping page 1 at user request.
Page 0 free space: 2005
Warning: Skipping page 2 at user request.
Page 1 free space: 2878
Page 2 free space: 3771
Success: Page sizes validated and "RPN83P" is ready for signing.
           In 3 page(s), 8654 bytes are available.
Assembly time: 0.869 seconds

Although these warnings don't seem to be fatal, they do clutter the output with spurious warnings. My brain is now trained to ignore them, which unfortunately means that I often miss other Warning messages which are important.

Diagnosis

These warning messages come from app.inc, lines #59-61:

  #if page > gpage+1
    .echo "Warning: Skipping page ",gpage+1," at user request."
  #endif

I tried to trace this code once, something to do with gpage, but it was too convoluted for me to follow. Since this didn't seem to do any harm, I gave up and just continued to ignore it.

(I'm filing this ticket for historical completeness, before I do a context switch to another major programming project and forget about this.)