Author |
Topic: opp codes (Read 1316 times) |
|
leslie griffin
Guest
|
 |
opp codes
« Thread started on: Mar 10th, 2010, 10:15pm » |
|
sorry,I can be a bit slow.Have not done much programming since my C64 days. As I remember,z80 and 6502 used a completlely diff instr set. How does my quad pentium understand my Ass program, there must be something else going on that I dont understand.
thx for your time and patience...
|
|
Logged
|
|
|
|
softweir
New Member
member is offline


Posts: 12
|
 |
Re: opp codes
« Reply #1 on: Mar 10th, 2010, 11:26pm » |
|
So long as you are writing pure Basic programs, there is no problem. BBC Basic in all its forms is interpreted (iirc), and is completely independent of the underlying hardware - so long as you have an interpreter written that operates with the hardware. Richard Russell has written the BBC Basic for Windows interpreter using all Intel instruction set codes, and that is all that is needed.
There is extremely high compatibility between BBC Basic for the Beeb and BBC Basic for Windows, and there is a huge body of programs that will work with no changes, or only a very few changes.
However, programs written in BBC Basic using assembly code for the 6502 chip won't run in BBC Basic for Windows. There are a number of these floating around in old magazine listings and books on BBC Basic programming, so you have to be careful to watch out if you are using these sources.
Also, if you are writing assembly code in your Basic program then you must learn and use the appropriate op codes. It is unlikely you will want to do this for quite a while, since Pentiums are so extremely fast! I am writing (when health permits) an Iterated Function System graphic program which is very fast in pure interpreted Basic, and would gain only moderate amounts of speed by being machine-coded. I doubt the performance boost would be worth the extra effort!
I imagine that it might be possible to write a 6502 emulator for BBC Basic for Windows, but this would be extremely hard work, and the small benefit wouldn't be worth the enormous effort.
Richard W.
|
|
Logged
|
|
|
|
JGHarston
Junior Member
member is offline


Gender: 
Posts: 52
|
 |
Re: opp codes
« Reply #2 on: Aug 6th, 2010, 3:20pm » |
|
on Mar 10th, 2010, 11:26pm, softweir wrote:I imagine that it might be possible to write a 6502 emulator for BBC Basic for Windows, but this would be extremely hard work, and the small benefit wouldn't be worth the enormous effort. |
|
http://mdfs.net/Apps/Emulators/Tube/65TubeEm/ A 6502 emulator written in BBC BASIC (6502Em/.bbc/.exe is the executable). It will run on RISC OS, Unix or Windows. I wrote it as a demo of (a) emulating the 6502 and (b) writing code in seperate modules and statically building them into the final runtime. It runs 6502 BASIC IV and View quite well 
|
|
Logged
|
|
|
|
|