Jump to content

Photo

Conditional compilation?


3 replies to this topic

#1 Karl G OFFLINE  

Karl G

    Dragonstomper

  • 561 posts

Posted Sat Sep 1, 2018 8:08 AM

I wasn't able to find anything in the docs, or discussion in the forum, but is there a way to do conditional compilation in bB? Something that is equivalent of "ifconst" in asm?

#2 RevEng OFFLINE  

RevEng

    River Patroller

  • 4,992 posts
  • Bitnik
  • Location:bottom of the stack

Posted Sat Sep 1, 2018 5:13 PM

Nope, but you can break out to assembly and do it yourself...
 
 asm
 ifconst OFFICIAL_RELEASE
end
 rem some conditional code here
 asm
 endif
end

I added "#ifconst" "#else" and "#endif" to 7800basic. Nice to be able to skip the "asm" wrappers.

#3 Karl G OFFLINE  

Karl G

    Dragonstomper

  • Topic Starter
  • 561 posts

Posted Sat Sep 1, 2018 5:37 PM

Thanks!  Is there any chance of this or some of your 7800basic enhancements getting backported to bB eventually?  I'm also thinking of your TIA sound driver.

 

 

Nope, but you can break out to assembly and do it yourself...
 

 asm
 ifconst OFFICIAL_RELEASE
end
 rem some conditional code here
 asm
 endif
end
I added "#ifconst" "#else" and "#endif" to 7800basic. Nice to be able to skip the "asm" wrappers.

 



#4 RevEng OFFLINE  

RevEng

    River Patroller

  • 4,992 posts
  • Bitnik
  • Location:bottom of the stack

Posted Sat Sep 1, 2018 6:25 PM

The #ifconst, #else, #endif would be easy enough, so I may do that when I next have my hands in it. I've back ported bug-fixes as I've run across them.

I'm not really sure there's a lot more in 7800basic that would be useful in bB; the trade-offs for a machine with 4k address space and 128 bytes of RAM are fairly different than one with 64k address space and 4k of RAM.

The TIA SFX driver in particular doesn't pack the sound data into ROM as efficiently as it might, in part because the format is extendable to pokey.




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users