D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Fwd: Blast from the past

 

On Wed, 25 Aug 2010, John wrote:

On Wed, 2010-08-25 at 15:38 +0100, Paul Sutton wrote:

The BBC's ability to use assembly language mixed in with basic was a
great feature too.



I am sure i have programs in some issues of your sinclair that mixed
basic and Hex,  or rather as part of the program the hex would be poked
in to the upper address spaces.  32768 - 65535 area, or was 32000 i
think hex started at.

of course you could do things like poke 23609,255 to make the keyboard
beep on key presses.

Poking hex into memory was fairly common on the spectrum and C64, but
you would have probably written it in an assembler then dumped the
memory out for putting into DATA after compiling.  The BBC had an in
line assembler, so you could have something like (as best memory serves)

10 print "hello world"
20 lda #$ff
30 sta $c000

The beeb was unusual is that it had short-cut indirection operators for peek and poke, so:

  20 !&200=&2a

to poke and

  30 a = ?&200

to peek address 200 hex. (ampersand to denote hex numbers) Direct memory access was supposed to be frowned upon in the Beeb as it has *fx commands to do most stuff. I think that was borrowed from BCPL.

The Apple ][ had 16-bit signed integers, so you'd poke/peek negative numbers... POKE -16384,0 ... CALL -151 etc.

Then just RUN the program and off it went. I've not googled to confirm
this but I am fairly certain it was along those lines as the BBC came
one day to Holsworthy Secondary to do a feature on computers in school,
and I was doing something really boring in assembler on a BBC while they
were looking for something to film; needless to say I didn't get on TV,
why couldn't I have been doing the wireframe 3d stuff on that day :[

I think you started assembler with a [ character somewhere, but it's been many years...

Gordon

--
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/listfaq