CBM prg Studio

You need an actual VIC.

Moderator: Moderators

Post Reply
User avatar
beamrider
Vic 20 Scientist
Posts: 1452
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Screen Designer

Post by beamrider »

One small suggestion. I think it would make the screen designer much more useful, if you could double click the characters in the Grid on the left and it take you straight to the character designer for that character and initialise it with the same colours.
ajordison
Vic 20 Enthusiast
Posts: 179
Joined: Fri Mar 19, 2010 4:31 pm
Website: http://www.ajordison.co.uk/
Location: Hartlepool, UK
Occupation: Software Engineer

Post by ajordison »

A few people have suggested something along those lines. The hard part is updating the screen designer when you've finished updating the character. It's not rocket science, but because of the way cbm prg studio was written it is a little tricky!

Don't forget that the character editor has a scratchpad, which is probably better suited to quick character editing.

Thanks for the suggestion!
Try out CBM prg Studio over at www.ajordison.co.uk
ajordison
Vic 20 Enthusiast
Posts: 179
Joined: Fri Mar 19, 2010 4:31 pm
Website: http://www.ajordison.co.uk/
Location: Hartlepool, UK
Occupation: Software Engineer

Post by ajordison »

Well it’s the end of the month and that means another version of CBM prg Studio.

What’s in this version? Well, for C64 fans the screen designer has been improved so that you can draw a path on the screen and generate the XY point data from it. For VIC 20 fans there’s, errrm bug fixes! :wink: For C128 fans (that’s right!) you can now generate prgs from BASIC 7 and assembly source. C128 users don’t have access to the screen designer and some other tools yet whilst I ‘C128ify’ them. Enjoy!

www.ajordison.co.uk
Try out CBM prg Studio over at www.ajordison.co.uk
rhurst
Omega Star Commander
Posts: 1371
Joined: Thu Jan 31, 2008 2:12 pm
Website: https://robert.hurst-ri.us
Location: Providence, RI
Occupation: Tech & Innovation

Post by rhurst »

No local labels (yet), only global... that must change, else your built-in assembler will be restricted to much smaller projects. Not a bad thing, mind you, but that's a limiting factor for its scope.

A local label could be prefixed by '@' and/or '+' character for easy identification, as long as it follows a global label first (the parent).

I am assuming you are storing labels in an array or list. Perhaps you can consider throwing it in a tree structure instead, so the label viewer on the right would have the [+] to expand global labels with any local labels contained within their scope. And the resolved address for all labels, global and local, can still be associated within the tree structure, so changes to your assembly process should be minimized with this change in data type.

More importantly, I don't want to come off sounding like this is easy or minimal renovations to your IDE either; I think CBM Program Studio has gotten very mature now. I'm just thinking of myself here, wishing to port my cc65 (ca65) assembler sources over to your IDE project format for other enthusiasts to possibly exploit, that's all. This is only speculative thinking out loud for you. :)
Any technology distinguishable from magic is insufficiently advanced.
https://robert.hurst-ri.us/rob/retrocomputing
ajordison
Vic 20 Enthusiast
Posts: 179
Joined: Fri Mar 19, 2010 4:31 pm
Website: http://www.ajordison.co.uk/
Location: Hartlepool, UK
Occupation: Software Engineer

Post by ajordison »

I understand what you say about local labels, a few people have also asked about this so I'll have to have a think about it. Even in my own small test projects coming up with unique global labels was becoming a pain.

Would a local label need a prefix? I guess that global labels would be quite rare so would it be better to prefix them with a character to identify them as global and assume everything else is local? I like the idea of having a label tree view, but maybe each node in the tree would be the filename and expanding that would show the labels. Could this idea be extended to global/local variables too?

You're right, this isn't a trivial change but I've been toying with the idea of adding macro support to the assembler, so if I'm adding that I might as well add local labels too.

As a side note, I usually release a new version of prg studio every month. Quite a few annoying bugs have been found in the latest version so I'm releasing a bug fix version (1.6.1) this weekend, it won't have any new features though. The next version will also have a new 'look and feel' and have proper dockable windows. Because of this, and the changes to the assembler, the next version (2.0.0!) will be Christmas I expect.
Try out CBM prg Studio over at www.ajordison.co.uk
User avatar
TLovskog
Vic 20 Enthusiast
Posts: 194
Joined: Fri Mar 25, 2011 3:16 pm
Location: Kävlinge, Sweden

Post by TLovskog »

I would also like to see local variables to your amazing package. I really appreciate all the effort.

Although your idea on marking globals instead make sense, it is the de facto standard to mark the local variables so I would vote for that.

The tree view with filenames is a very good idea.
BR
Thomas Lövskog
ajordison
Vic 20 Enthusiast
Posts: 179
Joined: Fri Mar 19, 2010 4:31 pm
Website: http://www.ajordison.co.uk/
Location: Hartlepool, UK
Occupation: Software Engineer

Post by ajordison »

I'd best go with the standard then! Just so I'm clear, local labels are local to the file they're in, they aren't local to any functions (or blocks or something) they're in.
Try out CBM prg Studio over at www.ajordison.co.uk
rhurst
Omega Star Commander
Posts: 1371
Joined: Thu Jan 31, 2008 2:12 pm
Website: https://robert.hurst-ri.us
Location: Providence, RI
Occupation: Tech & Innovation

Post by rhurst »

Local labels' scope are limited to the filename; cheap local labels' scope are limited to the LAST global label.

A primitive example:

MAIN.ASM
.global START
jmp START

GAME.ASM
START:
lda #0
tay
@loop:
sta $900A,y
iny
cpy #4
bne @loop

MAIN:
nop
@loop:
lda $028D
and #$02 ; got C= key?
beq @loop
rts


So @loop can be re-used because it follows a local label. In place of a .global directive, you can simple have UPPERCASE labels as "global" and humped labels as "local", i.e., STARTHERE: versus startHere:
The other semantic is using prepending or appending "$" to denote global labels, when there is no formal declaration option, i.e., $START: or START$:
Any technology distinguishable from magic is insufficiently advanced.
https://robert.hurst-ri.us/rob/retrocomputing
ajordison
Vic 20 Enthusiast
Posts: 179
Joined: Fri Mar 19, 2010 4:31 pm
Website: http://www.ajordison.co.uk/
Location: Hartlepool, UK
Occupation: Software Engineer

Post by ajordison »

Thanks for the example, I have a good idea about what to do now. The cheap local labels could be a problem to code up, but that would be something a pre-processor could take care of by replacing them with generated, unique local labels and then feeding the output to the assembler. How common are they?
Try out CBM prg Studio over at www.ajordison.co.uk
rhurst
Omega Star Commander
Posts: 1371
Joined: Thu Jan 31, 2008 2:12 pm
Website: https://robert.hurst-ri.us
Location: Providence, RI
Occupation: Tech & Innovation

Post by rhurst »

VERY common!! Every assembler I touched had some sort of cheap local label feature, with some expressed simply as -, --, ---, and +, ++, +++ for back or forward branching.

Programmers at that low-level do not want to have to craft a bunch of unique labels, i.e., like line numbers in BASIC.

Your idea of substituting each instance with an internal unique label is a good workaround... i.e., first @loop becomes _0001, second @loop becomes _0002, etc. :wink:
Any technology distinguishable from magic is insufficiently advanced.
https://robert.hurst-ri.us/rob/retrocomputing
ajordison
Vic 20 Enthusiast
Posts: 179
Joined: Fri Mar 19, 2010 4:31 pm
Website: http://www.ajordison.co.uk/
Location: Hartlepool, UK
Occupation: Software Engineer

Post by ajordison »

OK then, so what about variables, would they have global and local scope too?
Try out CBM prg Studio over at www.ajordison.co.uk
ajordison
Vic 20 Enthusiast
Posts: 179
Joined: Fri Mar 19, 2010 4:31 pm
Website: http://www.ajordison.co.uk/
Location: Hartlepool, UK
Occupation: Software Engineer

Post by ajordison »

A little earlier than usual but here's a new version of CBM prg Studio (v1.6.1). As the name suggests it's mostly a bugfix, it's also probably the last version to be released this year as my time will be taken up re-writing the assembler and adding some fancy docking windows. If there's time I'll probably add support for the C16 and plus/4 too, so I've set myself quite a target.

I still want to know when you find those bugs though!
Try out CBM prg Studio over at www.ajordison.co.uk
rhurst
Omega Star Commander
Posts: 1371
Joined: Thu Jan 31, 2008 2:12 pm
Website: https://robert.hurst-ri.us
Location: Providence, RI
Occupation: Tech & Innovation

Post by rhurst »

Woot!! Some awesome goals, keep up the excellent work, it's appreciated. :)
Any technology distinguishable from magic is insufficiently advanced.
https://robert.hurst-ri.us/rob/retrocomputing
ajordison
Vic 20 Enthusiast
Posts: 179
Joined: Fri Mar 19, 2010 4:31 pm
Website: http://www.ajordison.co.uk/
Location: Hartlepool, UK
Occupation: Software Engineer

Post by ajordison »

Here's a beta version CBM prg Studio 2.0.0.

There are a lot of new features in this version, notably dockable windows, assembler macros, local labels, 'cheap' local labels and some zero page optimisations. I released it as a beta version because there was a lot to test, which is where you guys come in!

Just extract it to and run it from its own directory, there's no need to uninstall your current version of CBM prg Studio.

Have a play around with it while you're stuffing yourself with mince pies and let me know of any bugs you find, or just comments about the new features.

Didn't quite manage adding the c16/plus/4 though...
Try out CBM prg Studio over at www.ajordison.co.uk
ajordison
Vic 20 Enthusiast
Posts: 179
Joined: Fri Mar 19, 2010 4:31 pm
Website: http://www.ajordison.co.uk/
Location: Hartlepool, UK
Occupation: Software Engineer

Post by ajordison »

Are people having trouble downloading this? My download counter is still zero. Assuming you want to download it of course!
Try out CBM prg Studio over at www.ajordison.co.uk
Post Reply