Search found 3717 matches

by jgharston
Wed Nov 13, 2019 8:50 am
Forum: software & utilities for the pc, mac or unix
Topic: Uses of the semicolon in BBC BASIC
Replies: 11
Views: 271

Re: Uses of the semicolon in BBC BASIC

I'm so glad that I work only with Operating Systems (Windows, Linux, MacOS, Android, iOS) in which BBC BASIC's SYS statement calls exactly the same API functions, in the same libraries, and with the same ABI, as a C program would. It makes life easier for a BASIC programmer, who can refer to the sa...
by jgharston
Tue Nov 12, 2019 7:44 pm
Forum: software & utilities for the pc, mac or unix
Topic: Uses of the semicolon in BBC BASIC
Replies: 11
Views: 271

Re: Uses of the semicolon in BBC BASIC

The _kernel calls give you more flexibility and are closer to the metal, but need more thinking to work out what you're doing. Quickly checking zZ80Tube I see I have: #ifdef Z80FILE_RO ctrl.load =blah... ctrl.exec =blah... ctrl.start=blah... ctrl.end =blah... chk_err(tmp=_kernel_osfile(Areg,filename...
by jgharston
Tue Nov 12, 2019 7:04 pm
Forum: software & utilities for the pc, mac or unix
Topic: Uses of the semicolon in BBC BASIC
Replies: 11
Views: 271

Re: Uses of the semicolon in BBC BASIC

If you write an application in C and it needs to call the "XOS_File" function in RISC OS, how does the information get returned? Is it necessary to use some kind of assembly language 'wrapper' to achieve this? In general, most of the register information is passed in a block. Depending on the libra...
by jgharston
Tue Nov 12, 2019 6:45 pm
Forum: software & utilities for the pc, mac or unix
Topic: Uses of the semicolon in BBC BASIC
Replies: 11
Views: 271

Re: Uses of the semicolon in BBC BASIC

If you call an 'X' SWI it either returns with V clear and results in the registers, or returns with V set and R0 pointing to an error block. SYS "XOS_File",5,filename$ TO result;flags:IF (flags AND 1) THEN result=>error block ELSE result=object type If you call a non-X SWI it always returns with V c...
by jgharston
Tue Nov 12, 2019 8:41 am
Forum: software & utilities for the pc, mac or unix
Topic: Uses of the semicolon in BBC BASIC
Replies: 11
Views: 271

Re: Uses of the semicolon in BBC BASIC

Supress the absence of a question mark in INPUT.
INPUT "Prompt: "A$ gives Prompt: _
INPUT "Prompt: ";A$ gives Prompt: ?_
INPUT "Prompt: ",A$ gives Prompt: ?_

Collect flags from SYS call:
SYS call[,in[,in...]] [TO [out[,out...]] [; flags]]
by jgharston
Mon Nov 11, 2019 6:08 pm
Forum: software & utilities for the pc, mac or unix
Topic: Proposal for BBC BASIC 'FOR lists'
Replies: 19
Views: 551

Re: Proposal for BBC BASIC 'FOR lists'

And 'OF' semantically matches what it's doing, and matches how you verbalise* the equivalent mathematic action:

for all X of {a, b, f, g, w, cat, trombone}

*well, we did at my school. ;)
by jgharston
Sun Nov 10, 2019 8:16 pm
Forum: programming
Topic: Mode 7 flip between pages
Replies: 12
Views: 698

Re: Mode 7 flip between pages

Both programs create 20 different Mode 7 screens in the Beeb's main memory, then change registers 12 and 13 of the 6845 CRT controller chip to change the 'Display Start Address' to cycle through the 20 screens to produce the animated images of Miner Willy and Technician Ted. I didn’t know you could...
by jgharston
Sun Nov 10, 2019 12:57 pm
Forum: programming
Topic: Mode 7 flip between pages
Replies: 12
Views: 698

Re: Mode 7 flip between pages

I think that the two programs below do something similar to what you are looking to achieve. They create animated images of Miner Willy and Technician Ted walking across the screen of the BBC micro. Both programs create 20 different Mode 7 screens in the Beeb's main memory, then change registers 12...
by jgharston
Sun Nov 10, 2019 12:53 am
Forum: software & utilities for the pc, mac or unix
Topic: Proposal for BBC BASIC 'FOR lists'
Replies: 19
Views: 551

Re: Proposal for BBC BASIC 'FOR lists'

FOR I% OF 3, 22, -9 NEXT FOR Day$ OF "Mon", "Fri", "Sun" NEXT My immediate reaction is that it would be a nice extension to the language and quite 'in keeping with' the general BBC BASIC philosophy (and doesn't need any new keywords!). What do you think? It's the sort of thing I've implemented as F...
by jgharston
Sat Nov 09, 2019 6:03 pm
Forum: programming
Topic: Semi-Automatic SAVE
Replies: 3
Views: 164

Re: Semi-Automatic SAVE

Hmmm. That challenges me to write a version that doesn't need Escape. ;) Ah ha! *KEY 1 DIM A%-1:IF A%<>LOMEM:*FX 216|MSAVE"MYPROG"|M :) DIM numvar max reserves a block of memory at the top of the heap. DIM numvar -1 reserves a block zero bytes long (as DIM numvar max reserves a block of a size to g...
by jgharston
Sat Nov 09, 2019 5:52 pm
Forum: programming
Topic: Semi-Automatic SAVE
Replies: 3
Views: 164

Re: Semi-Automatic SAVE

Hmmm. That challenges me to write a version that doesn't need Escape. ;)
by jgharston
Sat Nov 09, 2019 5:47 pm
Forum: upcoming and recent events & exhibitions
Topic: ABUG SOUTH 22 to 24 November 2019 - NOW FULL - but accepting names for reserve list
Replies: 97
Views: 3625

Re: ABUG SOUTH 22 to 24 November 2019 - NOW FULL - but accepting names for reserve list

I've been thrown another ball to juggle, so I'm going to have to pull out of ABUG South, so there's a place free.

After missing two, I'm more determined to get to the next one.

Judge: Keep the deposit, add it to the kitty.
by jgharston
Thu Oct 31, 2019 6:21 pm
Forum: emulators
Topic: ACCCON TST
Replies: 5
Views: 519

Re: ACCCON TST

MOS 3.50 has code in these pages. I never noticed that before, but would suggest all 3 pages are paged out. Any idea what the code there does? It's part of the RESET startup code, clears memory, initialises hardware, sets up default vectors, copies default font, etc. Stuff that's only done once.
by jgharston
Thu Oct 31, 2019 6:18 pm
Forum: emulators
Topic: ACCCON TST
Replies: 5
Views: 519

Re: ACCCON TST

My *MDUMP command will page out the I/O area, and confirms that all three pages are paged out.
Image1.gif
by jgharston
Tue Oct 29, 2019 11:42 pm
Forum: hardware
Topic: Master - Hangs on disk command
Replies: 10
Views: 320

Re: Master - Hangs on disk command

danielj wrote:
Tue Oct 29, 2019 10:32 pm
Don't assume BeebEm's behaviour is always correct :) (in this case it certainly isn't)
The emulated 1770 (and I think the 8271) in BeebEm returns 'drive empty' if the drive is empty. Acorn's 1770 DFS with the physical hardware 1770 does not.
by jgharston
Tue Oct 29, 2019 7:34 pm
Forum: hardware
Topic: Loading a ROM into SW Ram - basics
Replies: 39
Views: 830

Re: Loading a ROM into SW Ram - basics

rph wrote:
Tue Oct 29, 2019 7:30 pm
Now I've got this working does anyone have Exmon II ROM available for download? Not been able to find.
http://mdfs.net/System/ROMs/MCode/
by jgharston
Mon Oct 28, 2019 9:05 pm
Forum: hardware
Topic: Loading a ROM into SW Ram - basics
Replies: 39
Views: 830

Re: Loading a ROM into SW Ram - basics

It's perfectly fine uploading binary files to GitHub. GitHub has 'Download as raw file' which will download the single raw file, and 'Download as ZIP' which will download all the files in the project as a ZIP file. But, as the above poster has discovered, you have to SELECT the link, not SaveAs the ...
by jgharston
Mon Oct 28, 2019 9:02 pm
Forum: software & utilities for the pc, mac or unix
Topic: Acorn files on a PC/Mac, attributes and transfer software
Replies: 4
Views: 163

Re: Acorn files on a PC/Mac, attributes and transfer software

And this will output the simplest INF file:

Code: Select all

REM file$=name
REM load%=load
REM exec%=exec
REM data% DIM'd to at least 120 bytes
:
inf$=file$+".inf"
$data%=file$+" "+STR$~load%+" "+STR$~exec%
OSCLI "SAVE "+inf$+" "+STR$~data%+" + "+STR$~(1+LEN$data%)
by jgharston
Mon Oct 28, 2019 8:57 pm
Forum: software & utilities for the pc, mac or unix
Topic: Acorn files on a PC/Mac, attributes and transfer software
Replies: 4
Views: 163

Re: Acorn files on a PC/Mac, attributes and transfer software

This code will parse an INF line for just load and exec addresses (de-optimised from some existing code): REM data% is DIM'd to at least 124 bytes load%=0 exec%=0 inf$=basename$+".inf" inf%=OPENIN(inf$) IF inf% THEN IF EXT#inf%<120 THEN OSCLI "LOAD "+inf$+" "+STR$~data% data%!EXT#inf%=&0D200D20 A%=d...
by jgharston
Mon Oct 28, 2019 8:45 pm
Forum: software & utilities for the pc, mac or unix
Topic: Acorn files on a PC/Mac, attributes and transfer software
Replies: 4
Views: 163

Re: Acorn files on a PC/Mac, attributes and transfer software

There seems to be a convention to write these to a sidecar file with the .inf extension. ... Is there any standardisation to the format of these files? They've been around since forever, probably the late 1980s. <filename> <one or more spaces> <uppercase hex load address> <one or more spaces> <uppe...
by jgharston
Sun Oct 27, 2019 1:37 pm
Forum: other vintage computer hardware, software and games
Topic: How to...on a Commodore 64
Replies: 17
Views: 432

Re: How to...on a Commodore 64

C64's colours are very muted compared to the bright TTL ones on the beeb. But there are more of them! :) And they're in the wrong order! I had to build a lookup table to get them in the correct order for the MOS interface for BBC BASIC: RGBI C64 CHR$ colour 0 0 144 black 1 9 149 dark red/brown 2 5 ...
by jgharston
Sun Oct 27, 2019 1:25 pm
Forum: hardware
Topic: Loading a ROM into SW Ram - basics
Replies: 39
Views: 830

Re: Loading a ROM into SW Ram - basics

A faint bell is ringing at the back of my mind. Some SRLOAD commands make assumptions about what is in what sideways bank and invalidate certain <rom> numbers. For instance, I think the SRAM Utils in the 1770 DFS ROM assume that it only ever possible to have SRAM in 0,1,8,9 or something. Yep, check...
by jgharston
Sat Oct 26, 2019 11:10 pm
Forum: hardware
Topic: Loading a ROM into SW Ram - basics
Replies: 39
Views: 830

Re: Loading a ROM into SW Ram - basics

A faint bell is ringing at the back of my mind. Some SRLOAD commands make assumptions about what is in what sideways bank and invalidate certain <rom> numbers. For instance, I think the SRAM Utils in the 1770 DFS ROM assume that it only ever possible to have SRAM in 0,1,8,9 or something. Try going t...
by jgharston
Sat Oct 26, 2019 7:06 pm
Forum: hardware
Topic: Loading a ROM into SW Ram - basics
Replies: 39
Views: 830

Re: Loading a ROM into SW Ram - basics

The *SRLOAD function is for the Master IIRC. The *SRLOAD command is for /any/ computer, it is built in on the Master, and included in the 1770 DFS ROM, and otherwise is available in other SRAM Utils support ROMs or on disks. Are you sure that bank 15 is a valid RAM bank? The SRLOAD command on the J...
by jgharston
Sat Oct 26, 2019 12:47 pm
Forum: hardware
Topic: Loading a ROM into SW Ram - basics
Replies: 39
Views: 830

Re: Loading a ROM into SW Ram - basics

I've been able to install beebem on the mac and copy over (import files from disk) the ROM to a blank .dsd. When I try to load up using *SRLOAD BASICED 8000 15 I get: illegal address Some SRLOAD commands use decimal for the ROM number, some use hex (some will allow either). Try *SRLOAD BASICED 8000...
by jgharston
Sat Oct 26, 2019 12:46 pm
Forum: hardware
Topic: Loading a ROM into SW Ram - basics
Replies: 39
Views: 830

Re: Loading a ROM into SW Ram - basics

I seemed to be able to run it to my beeb using *SRLOAD name 8000 15, but could no get any further to actually run it, or see if it worked. Any idea how I'd do this? You then need to press Ctrl-Break to let the operating system recognise and initialise it. Depending on what system you're using and w...
by jgharston
Mon Oct 21, 2019 12:07 am
Forum: hardware
Topic: Screen shadow memory
Replies: 35
Views: 2006

Re: Screen shadow memory

You both seem to agree that the Watford board overlaps &3000-&AFFF, though the manual isn't too clear about this. I don't see how this can work, as soon as the RAM is paged into &8000-&AFFF it wipes out the code in ROM that triggered it. Yep. that's how sideways banking works. If bank 4 is paged in...
by jgharston
Mon Oct 21, 2019 12:02 am
Forum: software: other
Topic: Short and sweet prime numbers in Basic
Replies: 24
Views: 790

Re: Short and sweet prime numbers in Basic

There was a discussion on generation and testing of primes in the old 8BS magazine, issues 50, 51 and 52.
by jgharston
Sun Oct 20, 2019 10:39 am
Forum: hardware
Topic: EMR MIDI interface
Replies: 1
Views: 152

Re: EMR MIDI interface

I have a correction for your (VERY useful) schematic J.G.Harston - the two transistors at the top are BC546A. They're wired up as follows: Collector: To user port. 47K pullup Base: To MIDI port via 47K resistor Emitter: 0V That makes sense, and even makes the schematic look neater. Updated and uplo...
by jgharston
Sun Oct 20, 2019 12:19 am
Forum: hardware
Topic: HostFS+TCPIP
Replies: 67
Views: 1787

Re: HostFS+TCPIP

Anything you could find would be a help if only to verify what I'm doing. Thanks Is it for the OSWORD &C0 interface? That should just return the result of the command, these sort of things: #define socket_EBADF 0x9u /*Bad descriptor*/ #define socket_EAGAIN 0xBu /*No more ports*/ #define socket_EFAU...