Need help with CBM prg Studio
Moderator: Moderators
-
- Vic 20 Drifter
- Posts: 25
- Joined: Sat Jun 20, 2015 11:33 am
- Location: Scotland
- Occupation: Application Engineer
Need help with CBM prg Studio
Hello,
I may be being thick, but I just can't seem to get any assembly language program to run using this compiler.
Even something as simple as clearing the screen or changing the screen and border colours dosn't work.
The code is compiling fine, just dosn't do anything when I run the SYS command on the VIC emulator (Vice, is there a better one?)
Is there a good tutorial for using this with the VIC, or even just a very simple program that changes the screen colours or something. Just to show me what I'm doing wrong here. I think it must be something fairly fundimental. I've googled but just come up with C64 examples.
Any help, even just a listing of a few lines that work would be a help.
I may be being thick, but I just can't seem to get any assembly language program to run using this compiler.
Even something as simple as clearing the screen or changing the screen and border colours dosn't work.
The code is compiling fine, just dosn't do anything when I run the SYS command on the VIC emulator (Vice, is there a better one?)
Is there a good tutorial for using this with the VIC, or even just a very simple program that changes the screen colours or something. Just to show me what I'm doing wrong here. I think it must be something fairly fundimental. I've googled but just come up with C64 examples.
Any help, even just a listing of a few lines that work would be a help.
- Mike
- Herr VC
- Posts: 5134
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Re: Need help with CBM prg Studio
Hi, Garry,
Besides this, I think it's likely a handling issue of the cross-developing environment (CBM prg Studio and VICE) and not a Programming issue per se. That's the reason I moved your OP into the Emulation and Cross Development section.
You'll hardly find a better emulator than VICE. There are some others around, but VICE xvic gets most things right and you're extremely unlikely to stumble over any issue with emulation fidelity with that kind of programs you're trying. Most pitfalls regard to file system access/handling of disk images, and RAM size. You'd face those issues with any other emu as well.
Greetings,
Michael
It would be somewhat helpful to zoom in on the error, if you'd put the project into a *.zip and attach that to a follow-up post.garry68 wrote:The code is compiling fine, just dosn't do anything when I run the SYS command on the VIC emulator (Vice, is there a better one?)
Besides this, I think it's likely a handling issue of the cross-developing environment (CBM prg Studio and VICE) and not a Programming issue per se. That's the reason I moved your OP into the Emulation and Cross Development section.
You'll hardly find a better emulator than VICE. There are some others around, but VICE xvic gets most things right and you're extremely unlikely to stumble over any issue with emulation fidelity with that kind of programs you're trying. Most pitfalls regard to file system access/handling of disk images, and RAM size. You'd face those issues with any other emu as well.
Greetings,
Michael
-
- Vic 20 Drifter
- Posts: 25
- Joined: Sat Jun 20, 2015 11:33 am
- Location: Scotland
- Occupation: Application Engineer
Re: Need help with CBM prg Studio
Thanks for replying Mike,
I was being stupid!
I wrote this to test:
*=$1400
CHROUT = $FFD2
SCREENCOLOUR = $900f
; Setup the screen
lda #$8
sta SCREENCOLOUR
LOOP
lda #$93
jsr CHROUT
jmp LOOP
I then used the 'Generate SYS call' option which put in the BYTE line that maked the basic statment "10 SYS (5120)" in, and adds the other start address to BASIC memory. The issue that this was giving me the following, and I didn't notice I just had to move the start address
*=$1400 <-- It was inserting the SYS command under this, instead of before it. Unfortunetyly it always seemes to be doing this.
; 10 SYS (5120)
*=$1001
BYTE $0E, $10, $0A, $00, $9E, $20, $28, $35, $31, $32, $30, $29, $00, $00, $00
; Setup the screen
lda #8
sta SCREENCOLOUR
LOOP
lda #$93
jsr CHROUT
jmp LOOP
So no matter what line I put the initial memory start location on, or where the cursor is when I add the SYS statment, my initial memory start seems to be placed before the inserted text. Easy to fix though!
I was being stupid!
I wrote this to test:
*=$1400
CHROUT = $FFD2
SCREENCOLOUR = $900f
; Setup the screen
lda #$8
sta SCREENCOLOUR
LOOP
lda #$93
jsr CHROUT
jmp LOOP
I then used the 'Generate SYS call' option which put in the BYTE line that maked the basic statment "10 SYS (5120)" in, and adds the other start address to BASIC memory. The issue that this was giving me the following, and I didn't notice I just had to move the start address

*=$1400 <-- It was inserting the SYS command under this, instead of before it. Unfortunetyly it always seemes to be doing this.
; 10 SYS (5120)
*=$1001
BYTE $0E, $10, $0A, $00, $9E, $20, $28, $35, $31, $32, $30, $29, $00, $00, $00
; Setup the screen
lda #8
sta SCREENCOLOUR
LOOP
lda #$93
jsr CHROUT
jmp LOOP
So no matter what line I put the initial memory start location on, or where the cursor is when I add the SYS statment, my initial memory start seems to be placed before the inserted text. Easy to fix though!
- freshlamb
- Vic 20 Dabbler
- Posts: 76
- Joined: Sun Apr 04, 2004 5:38 pm
- Website: http://www.rufnoiz.com
- Location: Prince Albert SK Can
Re: Need help with CBM prg Studio
You can always Build -> Program -> PRG or D64. But I would recommend a BASIC stub or at least 0,0,0 if your program starts at the beginning of BASIC. I have had SO many problems with BASIC trying to re-link over my ML. It is not fun.
And yes CBMPS is the best!
And yes CBMPS is the best!
-
- Vic 20 Enthusiast
- Posts: 185
- Joined: Fri Mar 19, 2010 4:31 pm
- Website: http://www.ajordison.co.uk/
- Location: Hartlepool, UK
- Occupation: Software Engineer
Re: Need help with CBM prg Studio
Looks like you've got to the bottom of this but get in touch if you have any other problems.
Try out CBM prg Studio over at www.ajordison.co.uk
Re: Need help with CBM prg Studio
Hi Arthur !!! How are you ?
Just for reference I tested the code below with CBMPRGStudio 3.14.0 and it works
It produces an empty area from $1010 to $13FF, but for unexpanded programs I suggest this solution:
It start LM code on $100D without empty area.
Just for reference I tested the code below with CBMPRGStudio 3.14.0 and it works
Code: Select all
; 10 SYS (5120)
*=$1001
BYTE $0E, $10, $0A, $00, $9E, $20, $28, $35, $31, $32, $30, $29, $00, $00, $00
CHROUT = $FFD2
SCREENCOLOUR = $900f
*=$1400
; Setup the screen
lda #8
sta SCREENCOLOUR
LOOP
lda #$93
jsr CHROUT
jmp LOOP
Code: Select all
; 10 SYS4109
*=$1001
BYTE $0B, $10, $0A, $00, $9E, $34, $31, $30, $39, $00, $00, $00
CHROUT = $FFD2
SCREENCOLOUR = $900f
; Setup the screen
lda #8
sta SCREENCOLOUR
LOOP
lda #$93
jsr CHROUT
jmp LOOP
It start LM code on $100D without empty area.
Mega-Cart: the cartridge you plug in once and for all.
-
- Vic 20 Enthusiast
- Posts: 167
- Joined: Wed Feb 24, 2021 11:32 am
- Location: NC, USA
- Occupation: Engineer
Re: Need help with CBM prg Studio
Hi
How can I download CBM prg studio? When I try to from your web site, it fails and all I get is attempts by whoever is hosting you to send me to malware infested parts of the internet that my service provider warns me are harmful for my pc
- MysticSword
- Vic 20 Amateur
- Posts: 43
- Joined: Tue Nov 02, 2021 3:42 am
- Website: https://www.youtube.com/mysticsword
- Location: Canada
- Occupation: artist & care-giver
Re: Need help with CBM prg Studio
Are you using the link from the download page (towards the bottom of that page)?doug_in_nc wrote: ↑Fri Nov 05, 2021 12:16 pm How can I download CBM prg studio? When I try to from your web site, it fails and all I get is attempts by whoever is hosting you to send me to malware infested parts of the internet that my service provider warns me are harmful for my pc
http://www.ajordison.co.uk/download.html
It directs to a page to download the file on the file-hosting site of MediaFire.
It could be whatever anti-virus and/or browser you're using is overly fussy about downloading of some files or from certain sites.
I love retro-gaming and the Vic-20. 

-
- Vic 20 Enthusiast
- Posts: 167
- Joined: Wed Feb 24, 2021 11:32 am
- Location: NC, USA
- Occupation: Engineer
Re: Need help with CBM prg Studio
Yes, that’s the link I used, and yes it goes to MediaFire. Then Media Fire says there is a download problem and starts popping up lots of requests to allow notifications for random bits of software and odd web sites as well as popping up fake McAfee virus detection warnings (I know they are fake because I use a different antivirus package). I tried again just now and get the same problem. Could be I can’t download it because my antivirus settings are over-enthusiastic and I will see what I can do about it, but Media Fire is definitely trying to dump unwanted junk on my pc.MysticSword wrote: ↑Tue Nov 16, 2021 1:00 pmAre you using the link from the download page (towards the bottom of that page)?doug_in_nc wrote: ↑Fri Nov 05, 2021 12:16 pm How can I download CBM prg studio? When I try to from your web site, it fails and all I get is attempts by whoever is hosting you to send me to malware infested parts of the internet that my service provider warns me are harmful for my pc
http://www.ajordison.co.uk/download.html
It directs to a page to download the file on the file-hosting site of MediaFire.
It could be whatever anti-virus and/or browser you're using is overly fussy about downloading of some files or from certain sites.
- MysticSword
- Vic 20 Amateur
- Posts: 43
- Joined: Tue Nov 02, 2021 3:42 am
- Website: https://www.youtube.com/mysticsword
- Location: Canada
- Occupation: artist & care-giver
Re: Need help with CBM prg Studio
@Doug_in_nc : Ahh, bummer. Yeah, some sites have pop-up junk like that.
Between my anti-virus software, Nord VPN service I use (which has an option to filter out much of that pop-up junk ads) and my browser (Brave browser), I rarely get any pop-up junk like you mentioned. Hopefully an alternative / mirror-download option could be provided.
~
I've temporarily uploaded a ZIP with the CBM prg Studio program to my Google Drive:
https://drive.google.com/file/d/1aYK747 ... sp=sharing
(I figured it should be ok as it's free to download and use software, though of course consider still giving a Donation to the Owner of the software on their download page).
Hope that helps to get around the pop-up junk problems you are having with the MediaFire site.
Between my anti-virus software, Nord VPN service I use (which has an option to filter out much of that pop-up junk ads) and my browser (Brave browser), I rarely get any pop-up junk like you mentioned. Hopefully an alternative / mirror-download option could be provided.
~
I've temporarily uploaded a ZIP with the CBM prg Studio program to my Google Drive:
https://drive.google.com/file/d/1aYK747 ... sp=sharing
(I figured it should be ok as it's free to download and use software, though of course consider still giving a Donation to the Owner of the software on their download page).
Hope that helps to get around the pop-up junk problems you are having with the MediaFire site.
I love retro-gaming and the Vic-20. 

-
- Vic 20 Enthusiast
- Posts: 167
- Joined: Wed Feb 24, 2021 11:32 am
- Location: NC, USA
- Occupation: Engineer
Re: Need help with CBM prg Studio
Thanks for the link. Google asked me to request access from you before I could see it though. If you see a request, it's from meMysticSword wrote: ↑Tue Nov 16, 2021 9:00 pm @Doug_in_nc : Ahh, bummer. Yeah, some sites have pop-up junk like that.
I've temporarily uploaded a ZIP with the CBM prg Studio program to my Google Drive:
https://drive.google.com/file/d/1aYK747 ... sp=sharing
(I figured it should be ok as it's free to download and use software, though of course consider still giving a Donation to the Owner of the software on their download page).
Hope that helps to get around the pop-up junk problems you are having with the MediaFire site.

- MysticSword
- Vic 20 Amateur
- Posts: 43
- Joined: Tue Nov 02, 2021 3:42 am
- Website: https://www.youtube.com/mysticsword
- Location: Canada
- Occupation: artist & care-giver
Re: Need help with CBM prg Studio
Oops! My mistake, I forgot to change the access setting for it.doug_in_nc wrote: ↑Wed Nov 17, 2021 6:29 am Thanks for the link. Google asked me to request access from you before I could see it though. If you see a request, it's from me![]()
I've now changed it to "Anyone on the internet with this link can view" , so now anyone who goes to that link should be able to view the page and be able to download the ZIP file there. Try it now.
I love retro-gaming and the Vic-20. 
