Search found 288 matches
- Sat Feb 20, 2021 7:39 pm
- Forum: programming
- Topic: Reading a disc catalogue
- Replies: 15
- Views: 463
Re: Reading a disc catalogue
Why why why why why why whyw hwy do people keep re-inventing scan-directory from scratch and seemingly never manage to find OSGBPB 8 in the manual? I guess it's just a bit too well-hidden. I must have seen OSGBPB, taken on board the received wisdom that -- in DFS at least -- it is just a wrapper ar...
- Sat Feb 20, 2021 1:57 pm
- Forum: programming
- Topic: Reading a disc catalogue
- Replies: 15
- Views: 463
Re: Reading a disc catalogue
is the starting sector really important, though? I'm only planning to access the files using OSFILE or OSFIND -- and the latter probably only indirectly, as *EXEC or through OPENUP in BASIC. This is what I've come up with in BASIC, by the way: 1000REM..PARSE FNreaddir OUTPUT.. 1010DEFFNfilename(E$) ...
- Fri Feb 19, 2021 10:18 pm
- Forum: programming
- Topic: Reading a disc catalogue
- Replies: 15
- Views: 463
Re: Reading a disc catalogue
Ah, thanks -- that seems to be exactly what I was missing! So OSGBPB 8 with index &00000000 does the rough equivalent of rewinddir() followed by readdir() and gives you the first entry and the index of the next entry. Then you pass that index to subsequent calls of OSGBPB8, which behaves like re...
- Thu Feb 18, 2021 8:23 pm
- Forum: programming
- Topic: Reading a disc catalogue
- Replies: 15
- Views: 463
Reading a disc catalogue
Is there a "better" way of reading the files from a disc with the intent to create a menu than intercepting WRCHV , issuing *INFO *.* and parsing the result? That seems a bit of a length to go to; like having a standby generator to run the electronic ignition of a gas cooker instead of usi...
- Tue Feb 09, 2021 8:57 pm
- Forum: development tools
- Topic: BeebAsm
- Replies: 131
- Views: 18760
Re: BeebAsm
Would it be possible to add a feature to BeebAsm where PUTTEXT, INCBIN et al can launch a shell with two extra environment variables, one containing all the source code seen so far and the other with -v output so far; run an external command; and use its STDOUT in the disc image?
- Sat Jan 23, 2021 2:27 pm
- Forum: programming
- Topic: Trick MODE changes
- Replies: 1
- Views: 219
Trick MODE changes
When you change screen MODE either in BASIC or using OSWRCH &16, the screen is cleared. This is what you want most of the time, since text and graphics will become horribly distorted with colour depth changes. But how easy would it be just to reprogram the CRTC and the MOS values for a different...
- Wed Jan 20, 2021 12:31 am
- Forum: 8-bit acorn software: other
- Topic: BCP: a BBC Micro printed circuit design program
- Replies: 70
- Views: 9523
Re: BCP: a BBC Micro printed circuit design program
And here is the latest version of the photoplot output program, as a disc image ( sources on GitHub ): photoplot.ssd It includes the trivial design shown, so you can prove it really works :D. Also included is a modified version of just the beginning of the page A workspace with correct via drilling ...
- Sun Jan 17, 2021 8:30 pm
- Forum: programming
- Topic: Circle floodfill ideas?
- Replies: 56
- Views: 1246
Re: Circle floodfill ideas?
Another way of doing it (which I use in Z80 BBC BASIC) is the so-called 'long division' method, which you were probably taught at school (I certainly was). Unless we learned different methods, which is entirely possible, the method I was using is the school method, adapted to work in binary: the ro...
- Sun Jan 17, 2021 4:12 pm
- Forum: programming
- Topic: BBC BASIC detecting if it is being run on a BBC or Archimedes
- Replies: 14
- Views: 481
Re: BBC BASIC detecting if it is being run on a BBC or Archimedes
These are all boring ways! It would be much more interesting to find out whether the processor is a 6502 or an ARM by storing some code directly into memory with !, then running USR on it; the code being carefully chosen to be readable as either 6502 or ARM code, but give different results in each c...
- Sat Jan 16, 2021 10:44 pm
- Forum: programming
- Topic: Circle floodfill ideas?
- Replies: 56
- Views: 1246
Re: Circle floodfill ideas?
A polygon with more than 20 sides is hard to tell from a circle (16 sides is obvious :( ), but the proper way to draw a circle is to make use of the fact that for any point (X,Y) on a circle of radius R centred on the origin, X**2 + Y**2 = R**2. So as Y increases from 0 to R, you can calculate X and...
- Sat Jan 16, 2021 10:03 pm
- Forum: programming
- Topic: Beebasm question
- Replies: 5
- Views: 221
Re: Beebasm question
You can also use MOD 256 to get the low byte of a 16-bit address ..... The main thing is, you were missing the #. That comment mark means "immediate mode", or "use this number as an actual number, and not a clue where to find the real number". The brackets confused BeebASM into t...
- Sat Jan 16, 2021 7:58 pm
- Forum: 8-bit acorn software: other
- Topic: BCP: a BBC Micro printed circuit design program
- Replies: 70
- Views: 9523
Re: BCP: a BBC Micro printed circuit design program
Well, so far, all is going well. The reporting program can now generate its own photoplot headers, reading the aperture definitions directly from the design, produce the body of the data as selected in the menu (in case it's not obvious, the standard plots just store pre-selected combinations of opt...
- Sat Jan 16, 2021 12:18 am
- Forum: programming
- Topic: assembler noob
- Replies: 17
- Views: 487
Re: assembler noob
It staggers me people can write whole games in 8-10k when it's taken me 1k just to plot a few lines on the screen :) Ah, but if you are careful, you will be able to reuse a lot of that code over and over again ..... It's not unusual to abstract out just a few instructions into a JSR subroutine. Any...
- Fri Jan 15, 2021 7:28 pm
- Forum: programming
- Topic: assembler noob
- Replies: 17
- Views: 487
Re: assembler noob
It's an easy trap to fall into. But when you are talking straight to the 6502, you leave BASIC behind. When you assemble your code, the actual values of the variables you are using as labels get baked into the final code. This means the code has to be run from the same address it was assembled to ru...
- Sat Jan 09, 2021 10:35 pm
- Forum: programming
- Topic: Notepad++ with BBC Basic?
- Replies: 9
- Views: 527
Re: Notepad++ with BBC Basic?
There is a Kate syntax highlighting module for editing Kate syntax highlighting modules in Kate (!) so it ought to be possible to craft a new version of the BBC BASIC syntax highlighting module with OPENUP and OSCLI just by following the existing structure. If all else fails, post it up here and I'l...
- Sat Jan 09, 2021 10:25 pm
- Forum: programming
- Topic: 6502 debugging challenge
- Replies: 20
- Views: 985
Re: 6502 debugging challenge
Oh, that . The indirect addressed instructions on the 6502 only update the bottom 8 bits of the address bus when reading the second byte of a two-byte value; which means, for example, JMP (&30FF) will get the high byte of the address from &3 0 00, and not &3100 as you might expect. The (...
- Sat Jan 09, 2021 7:39 pm
- Forum: programming
- Topic: JMP vs JSR to oswrch etc
- Replies: 5
- Views: 342
Re: JMP vs JSR to oswrch etc
The JMP instruction will eventually hit upon an RTS instruction, and then the program counter will get the address that was saved on the stack by the last JSR instruction. That will be whatever an RTS instruction in this subroutine would have returned to. Ending a subroutine with a JMP instruction, ...
- Fri Jan 08, 2021 10:14 pm
- Forum: programming
- Topic: BASIC assembler weirdness
- Replies: 12
- Views: 499
Re: BASIC assembler weirdness
This is what is known as "undefined behaviour". A deterministic state machine must, by definition, always give the same response to the same input conditions. If you ask the computer to do something that doesn't make sense, but it can't see anything wrong enough with it to complain about, ...
- Mon Jan 04, 2021 2:59 pm
- Forum: 8-bit acorn software: other
- Topic: BCP: a BBC Micro printed circuit design program
- Replies: 70
- Views: 9523
Re: BCP: a BBC Micro printed circuit design program
And here are some screenshots of the reporting module! bcp_ppmenu1s.png This screen lets you select one of the standard plots. ("Single-sided" here means: treat tracks routed on the top side as though they were wire links. Vias will be exposed in the solder mask, and tracks shown on the si...
- Sat Jan 02, 2021 10:09 pm
- Forum: 8-bit acorn software: other
- Topic: BCP: a BBC Micro printed circuit design program
- Replies: 70
- Views: 9523
Re: BCP: a BBC Micro printed circuit design program
Well, that went nicely nicely, Sporty Spicely! No errors, and only one warning, from the online Gerber Viewer at https://gerber.ucamco.com . And not too many nasty surprises in what it looked like, either! I'm also not surprised it seems to have taken so long to write, either, once I look at the fil...
- Sat Jan 02, 2021 7:41 pm
- Forum: programming
- Topic: Displaying a Message
- Replies: 16
- Views: 689
Re: Displaying a Message
I used to do exactly that in Z80 code, BITD. On the Z80, &00 was a NOP , and could safely be executed in fewer clock cycles than it would take to skip over it. Which set in motion a train of thought relating to executing the end-of-text character, that gave me a crazy idea for an even naughtier...
- Fri Jan 01, 2021 7:01 pm
- Forum: programming
- Topic: Displaying a Message
- Replies: 16
- Views: 689
Displaying a Message
Sometimes you have a neatly defined section of code for displaying every possible message in your program, which you can call with a message number and it will display that. It makes it very easy to introduce text compression, or create versions of the program for speakers of other languages. For th...
- Wed Dec 30, 2020 12:10 pm
- Forum: 8-bit acorn software: other
- Topic: BCP: a BBC Micro printed circuit design program
- Replies: 70
- Views: 9523
Re: BCP: a BBC Micro printed circuit design program
Well, it seems like a lot of hard work with precious little to show for it so far; but I guess that's the nature of the beast. I'm doing the development almost entirely under BeebAsm now I'm happy with the font; which means I can make lots of small, fast changes on the host side. Which in turn means...
- Tue Dec 22, 2020 6:42 pm
- Forum: 8-bit acorn software: other
- Topic: Micro-Prolog - No space left
- Replies: 5
- Views: 395
Re: Micro-Prolog - No space left
I don't know much about MicroProlog, but thinking in general terms it sounds very much like the interpreter running out of stack space. Are you making a redundant copy of something you should be overwriting? If you are doing something recursive, you might be going too deep.
- Sat Dec 19, 2020 11:04 pm
- Forum: 8-bit acorn software: other
- Topic: Why was BBC BASIC so fast?
- Replies: 222
- Views: 11074
Re: Why was BBC BASIC so fast?
Which is precisely how all my BASICs, including Z80 BBC BASIC, work (which I expect you knew, since I've described it here before). I certainly remember it being a feature of some implementations of BBC BASIC on non-Acorn hardware. Was the Cambridge Z88 BASIC one of yours? (I know the Amstrad NC100...
- Sat Dec 19, 2020 9:40 pm
- Forum: 8-bit acorn software: other
- Topic: Why was BBC BASIC so fast?
- Replies: 222
- Views: 11074
Re: Why was BBC BASIC so fast?
Do you know of any other versions of BACIC that were available during the lifetime of the BBC A/B/B+/Master range that were as sophisticated in their numeric variable handling? ZX Spectrum BASIC had a special way of storing integers in the range -65535 to 65535. Floating-point numbers work like res...
- Fri Dec 18, 2020 3:10 pm
- Forum: 8-bit acorn software: other
- Topic: Rtty
- Replies: 7
- Views: 552
Re: Rtty
Does anyone know the modern equivalent for the ac187 transistor. Thanks It's a Germanium NPN, good for 20V, 2A, h FE =100. The first thing I would try would be a BC337, which is a silicon NPN device with similar or better ratings. If it's doing anything very analogue, you might need to change some ...
- Fri Dec 18, 2020 12:33 am
- Forum: 8-bit acorn software: other
- Topic: BCP: a BBC Micro printed circuit design program
- Replies: 70
- Views: 9523
Re: BCP: a BBC Micro printed circuit design program
I can't work out how to post a screenshot off this Mac yet, and I don't think I've got the GIMP installed on it, so you'll have to imagine that for now. But I've been working on generating photoplot output files, which entails generating my own triangles and text. And in the course of testing my hom...
- Thu Dec 17, 2020 11:45 pm
- Forum: 8-bit acorn software: other
- Topic: PCB Designer Watford Electronics / Datapen lightpen
- Replies: 13
- Views: 685
Re: PCB Designer Watford Electronics / Datapen lightpen
Haha, yes on Sophie - thanks to the internet I have seen her and found out a lot about her since - I love the ARM design too. She is now a hero to me. It does sound familiar of those bit store calculations. Your bit use looks to be more frugal. Well, I was starting from the assumption that it was g...
- Mon Dec 14, 2020 10:44 pm
- Forum: 8-bit acorn software: other
- Topic: PCB Designer Watford Electronics / Datapen lightpen
- Replies: 13
- Views: 685
Re: PCB Designer Watford Electronics / Datapen lightpen
Nice to see someone working on something similar! It is a stretch on the beeb - the archimedes would have walked it in BASIC! Let's just say I began by thinking very hard about the data structures I was going to be using, and making heavy use of a propelling pencil, squared paper and a rubber. I ma...