UK Vintage Radio Repair and Restoration Powered By Google Custom Search Vintage Radio and TV Service Data

Go Back   UK Vintage Radio Repair and Restoration Discussion Forum > Specific Vintage Equipment > Vintage Computers

Notices

Vintage Computers Any vintage computer systems, calculators, video games etc., but with an emphasis on 1980s and earlier equipment.

Reply
 
Thread Tools
Old 1st Mar 2024, 12:40 am   #61
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,162
Default Re: SC/MP programming chat.

This is one of those crude 'quickie programs' written for a one-off task, but might on occasion be handy:

Neither Kitbug nor KitbugPlus have a means of saving programs as binaries, so this process converts the output of the Kitbug or KitbugPlus "T" type
command into a binary file, permitting NIBL or binary programs to be subsequently fast-loaded with no serial delays.
Its crude, and probably only worthwhile for demo programs that you might load frequently but dont change, such as "CALENDAR.BAS".

T2BIN is written using lccwin32 so runs in a Windows command window.

With the typically required serial delays, a 'conventional' load of CALENDAR.BAS takes about 1 minute 44 seconds.

CALENDAR.BIN, produced by T2BIN, takes only 8 seconds as the KitbugPlus fastloader needs no serial delays.

Using NIBL-E as an example, to save a current NIBL program in page-2:
Type PRINT TOP, convert this to hex and make a note of this value.
enter LINK 0 to re-enter KitbugPlus
Open a log file in Teraterm
issue the Kitbug command T2000 which will scroll until interrupted.
Watch the address column, when the TOP hex value you noted earlier is exceeded, issue a BREAK (ALT-B) and then close the log file.

Depending where you started the log, and how quick your reactions are, the log file will need editing with Windows Notepad so it consists ONLY
of the address & data values required, no header or spurious text at the start or end.
Note there is a space after the data immediately before the CR/LF.
It should look similar to this, each line ending in space, CR/LF:
Code:
2000 08
2001 C4
2002 28
2003 33
2004 C4
2005 00
...etc
...any lines addressed after the TOP address noted earlier can be deleted.

To create the BIN file, run
T2BIN mylogfile.txt mybinfile.bin

Thereafter, the saved program can be loaded using S2000 with no delays, followed by G1970 (NIBL-E warm start)

Always save from the page start address to TOP of the required NIBL page. Page 2 starts at 2000h, page 6 at 6000h etc.
PRINT TOP reports in decimal so you'll have to convert it

As always the process is much quicker and easier to do than to describe... again its a bit laborious so only really worthwhile for
demos that are frequently loaded but dont change, like 'calender.bas'.
I havent tested this with a Linux-edited logfile, it probably wont work with Linux line endings.
The file is at the bottom of the list:
https://www.mccrash-racing.co.uk/phi...scmp.htm#links
Cheers
Phil_G
Phil__G is offline   Reply With Quote
Old 20th Mar 2024, 1:46 am   #62
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,162
Default Re: SC/MP programming chat.

Another trivial NIBL demo to leave running at a show - looks best from a distance
https://www.mccrash-racing.co.uk/philg/scmp/INSIDE.BAS
Phil__G is offline   Reply With Quote
Old 26th Apr 2024, 12:05 pm   #63
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,806
Default Re: SC/MP programming chat.

I've just noticed that San Bergman's page about his SC/MP 'cross' for SBASM3 was last updated on 31st Dec 2023, which is more recently than the date we were discussing and trying to solve the matter of out-of range jumps not being caught by the assembler. (posts #23 - #51 approx). Of course he may just have been doing some end of year maintenance on the site.

I wonder if he changed anything in the discussion of the 'cross' which might shed light on why his version was allowing out of range jumps to pass.

In particular,

Quote:
The program starts at address $0001, whereas the monitor RAM addresses are located from $FE0 to $FFF, which is at the end of the current page. By using a negative offset to the PC value, the effective address wraps back in the current page, ending up at addresses somewhere near the monitor RAM locations. Please note that this trick is only possible right at the beginning of a page, where the RAM locations are placed right at the end of that page. It is also possible to wrap from the end of the page, back to the beginning of that page. As of SC/MP Cross overlay 3.02.00 the SB-Assembler doesn't issue a range error any more when such a page wrapping occurs.
Did I possibly break something when I twiddled with the jump offset range limits towards the back end of last year, or is it still working as expected under all forseeable circumstances as far as anyone knows?
SiriusHardware is online now   Reply With Quote
Old 26th Apr 2024, 2:23 pm   #64
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,162
Default Re: SC/MP programming chat.

I'm a frequent user G and with your amended cross file I have no problems whatsoever, so I will continue using yours, I've no inclination to 'upgrade' a perfect setup
Phil__G is offline   Reply With Quote
Old 26th Apr 2024, 2:36 pm   #65
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,806
Default Re: SC/MP programming chat.

OK, I'll continue to assume no news is good news, cheers.
SiriusHardware is online now   Reply With Quote
Old 26th Apr 2024, 7:25 pm   #66
Realtime
Hexode
 
Join Date: Jan 2021
Location: Ashford, Kent, UK
Posts: 328
Default Re: SC/MP programming chat.

Quote:
Originally Posted by Phil__G View Post
I'm a frequent user G and with your amended cross file I have no problems whatsoever, so I will continue using yours, I've no inclination to 'upgrade' a perfect setup
I agree. It all works great as it is ?
Realtime is offline   Reply With Quote
Old 26th Apr 2024, 9:10 pm   #67
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,162
Default Re: SC/MP programming chat.

I havent checked yet but I expect San has adopted your edit G.
Phil__G is offline   Reply With Quote
Old 26th Apr 2024, 10:23 pm   #68
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,806
Default Re: SC/MP programming chat.

He doesn't seem to have changed the version in the main download, dated 31-12-2015, although the date stamp on the file in the download is 28/09/2021. If I remember correctly there was a newer version of San's cross which for some reason had never made it into the main 'distro'.

For the moment, I think we may be the guardians of the most up to date version of the CRSCMP.PY 'cross', although I would prefer that we weren't.

Quote:
# crscmp.py
#
# Package module file for the SB-Assembler sbasm
# See www.sbprojects.net for details
#
# Author: San Bergmans
# Date : 2015-12-31
#
# Cross Overlay for the SC/MP micro processor
#
# ------------------------------------------------------------------------------

import sys
import os

import assem
import dec
import errors
import target

crossversion = '3.02.00'
minversion = '3.01.00'
SiriusHardware is online now   Reply With Quote
Old 26th Apr 2024, 11:54 pm   #69
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,162
Default Re: SC/MP programming chat.

San's Github still has the old version too. I kept a copy of his original datestamped 19/07/2021, I just did a compare and its identical to his current github cross and also identical to the one on his website within current download file sbasm30307.zip
So, sadly, neither source of Sans "latest" (his words!) crscmp.py cross file has changed since we first noticed the problems. You're still the man, G
Phil__G is offline   Reply With Quote
Old 2nd May 2024, 12:36 pm   #70
Phil__G
Octode
 
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,162
Default Re: SC/MP programming chat.

Today I had a lovely email reply from San, he's fine, he's such a nice, humble bloke, but has been very busy with many projects on the go, house refurbishment and also planning his retirement

The good news is that both the SBASM website and Sans Github have now been updated to version 3.03.10 with the 'Sirius modded' cross file for the SC/MP for which he is sincerely grateful. This is great news.
I've done a compare and indeed the 'new' cross (which we've been using for a year) is in place

Last edited by Phil__G; 2nd May 2024 at 12:44 pm.
Phil__G is offline   Reply With Quote
Old 2nd May 2024, 12:56 pm   #71
SiriusHardware
Dekatron
 
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,806
Default Re: SC/MP programming chat.

Good news, and good to know that San is still around after all.
SiriusHardware is online now   Reply With Quote
Reply

Thread Tools



All times are GMT +1. The time now is 12:46 am.


All information and advice on this forum is subject to the WARNING AND DISCLAIMER located at https://www.vintage-radio.net/rules.html.
Failure to heed this warning may result in death or serious injury to yourself and/or others.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright ©2002 - 2023, Paul Stenning.