Page boundary crossed, CBM Studio

You need an actual VIC.

Moderator: Moderators

Post Reply
User avatar
mythic66
Vic 20 Drifter
Posts: 32
Joined: Sat Dec 31, 2022 1:21 pm
Location: Canada
Occupation: Technician

Page boundary crossed, CBM Studio

Post by mythic66 »

Hi,

I'm getting this error in CBM Studio, it pop me this at line 183, and 188. There's not much info about it in the help. Google gave
me a few hints, but as I can see, the jump address is quite close, so I can't figured out why this error keep coming.

Code: Select all

00179  10EF  A2 00                 LDX #$0
00180  10F1  A0 00                 LDY #$0
00181  10F3  BD 5F 12   LOOPR0     LDA TOPBOX1,X      ; TOP BOX
00182  10F6  C9 00                 CMP #0             ; END ?
00183  10F8  F0 0C                 BEQ LOOPR1
00184  10FA  9D 00 1E              STA $1E00,X
00185  10FD  AD 67 15              LDA YELLOW
00186  1100  9D 00 96              STA $9600,X
00187  1103  E8                    INX
00188  1104  D0 ED                 BNE LOOPR0
00189  1106             
00190  1106  A2 00      LOOPR1     LDX #0
tlr
Vic 20 Nerd
Posts: 567
Joined: Mon Oct 04, 2004 10:53 am

Re: Page boundary crossed, CBM Studio

Post by tlr »

There is a page crossing, yes. This will make the branches take one additional cycle when taken, but this is normally not an error. Perhaps you have some flag set to the assembler to make this error out?
User avatar
Mike
Herr VC
Posts: 4841
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Page boundary crossed, CBM (Prg?) Studio

Post by Mike »

mythic66 wrote:There's not much info about it in the help.
A note to the maintainer should be in order in such a case, and normally questions regarding the use of cross-developing tools have their own section here in Denial, but regardless ...
tlr wrote:[...] this is normally not an error. [...]
If anything, the assembler may issue a warning, but unless explicitly being told so, that condition should not terminate the assembly. There's simply no good reason to, the 65xx handles page-crossing branches, even if those take one cycle longer, 4 instead of 3 cycles when taken.

The only reason to flag this as error (on programmer's demand!) is for code that needs to be cycle exact and would break, i.e. lose its intended timing, if that extra cycle got inserted.

...

On another two notes: that CMP #0 instruction in $10F6 is redundant. The Z flag you test with BEQ LOOPR1 is already set as intended by the LDA instruction before. Also, is there a specific reason LDA YELLOW loads a (presumably) constant value from memory with absolute address mode? YELLOW could quite as well be defined as constant symbol for the value 7 and then be referred as immediate constant with LDA #YELLOW, which is both shorter and faster.
User avatar
thegg
Vic 20 Amateur
Posts: 69
Joined: Mon Aug 30, 2021 4:49 am
Location: England
Occupation: retired

Re: Page boundary crossed, CBM Studio

Post by thegg »

Report Page Boundary Crossing is an Assembler option found in Tools/Options/Assembler. Uncheck the option and the warnings will no longer appear. The warnings are just information, not errors. In the absence of any true errors, the assembly will complete.
User avatar
bjonte
Vic 20 Hobbyist
Posts: 110
Joined: Sun Jan 22, 2017 5:47 am
Location: Gothenburg

Re: Page boundary crossed, CBM Studio

Post by bjonte »

That setting will give a lot of false positives in a large program. This needs to be applied only in the places where it is useful. Maybe there’s a way to turn it on and off during assembly? I wrote a macro to give me that warning if a block of code crosses a boundary instead.
User avatar
mythic66
Vic 20 Drifter
Posts: 32
Joined: Sat Dec 31, 2022 1:21 pm
Location: Canada
Occupation: Technician

Re: Page boundary crossed, CBM Studio

Post by mythic66 »

Sorry to misplaced this post, now I will visit this section more often !

I disabled the alarm, but before I just wanted to make sure everything was alright. and yes, indeed, the program
is working correctly despite this warning.

about the extra command ( cmp #0 ), I usually declutter the code once it's working and purged any extra bits.

@bjonte, this is where you can shut off the warning.
page.png
User avatar
thegg
Vic 20 Amateur
Posts: 69
Joined: Mon Aug 30, 2021 4:49 am
Location: England
Occupation: retired

Re: Page boundary crossed, CBM Studio

Post by thegg »

If you should need to know about page boundary crossings, you can enable the options setting and then use the 'warning on|off' directive to enable the messages in the critical code. However, please note that all warnings are enabled/disabled by the directive.
Post Reply