16 November 2017, 19:12 | #21 | |
Registered User
Join Date: Jul 2014
Location: london
Posts: 49
|
Quote:
halted >b sd(,,1) -s Boot0,0,1) -s Invalid Page Bus Error PC Fetch at 0x0E0A4CB4 |
|
16 November 2017, 20:34 | #22 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
thats the page bus error I also see. hmmm.
so it is not a problem with cygwin, which is a nice find #1) while in emulation i was missing a "/". i did an entry in my-sun-macros.txt: Control_R F11 = slash so I have the slash now using "right ctrl + F11" #2) perhaps we should try to play with the settings in SUN3-CARRERA cpu type, more memory or something. no clue yet. some value says 4GB, which is the limit on a 32 bit system?, i'm using cygwin in 32bit version, so maybe somehow related? maybe lower that values? Last edited by emufan; 16 November 2017 at 20:46. |
17 November 2017, 17:25 | #23 |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,344
|
I tested bcpl.020 on NetBSD/amiga and it seems to work fine. Some massaging of the makefile will be needed to build an Amiga object file (do make bcpl.ld to do that). Maybe also replace the bassem executable with cassem (from elsewhere in the OS source leak archive) since bassem just seemed to crash for me (on NetBSD 5.2).
|
17 November 2017, 18:36 | #24 | |
Registered User
Join Date: Jul 2014
Location: london
Posts: 49
|
I got TME to work with NetBSD/sun3 7.1. I think the bus error is just a generic "things broken" error. I was a lot more careful with partitioning (using powers of 2) and made sure partitions were aligned on (Unix) FFS cylinders. Also the NetBSD/sun3 instructions were out by one on a tape block count. The install still errored and its a bit hacked up TBH but I'm now booting in single user mode OK and running the bcpl binaries fine.
I changed the case on the file system to match the Makefile and have Quote:
Now getting a "Name not declared - tidyup" error from BCPL |
|
17 November 2017, 19:15 | #25 |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,344
|
Yes I'm seeing that too.
Also, the makefile reads ../DOS/support/fpsim.obj Changing that to the "local" one (assembled from fpsim.asm) might work. But maybe the Commodore-Amiga version would have used mathffp.library??? There's an alternative fpsim.asm in other/abasic/abasic.tar.z The makefile calls alink with ../DOS/com/interface.om The .asm source for that is probably in other/old_fs/old_fs.tar.z (OLD_FS/dos.v35/com/interface.asm in that archive). |
17 November 2017, 19:41 | #26 |
Registered User
Join Date: Jul 2014
Location: london
Posts: 49
|
There are Sun date strings in bassem suggesting its a *really* old "METACOMCO ASSEMBLER". Maybe SunOS 1 or 2?
I can't execute it either but guess it might still work on a later Sun 3 (?) just not NetBSD. Or maybe an Amiga version would work? |
17 November 2017, 19:48 | #27 |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,344
|
Yes running assem (or another compatible assembler) on the Amiga should work, but try cassem first: v40/tools/src/cassem/cassem
Also you could modify the makefile to use calink instead of alink. That's in v40/tools/src/calink/ |
17 November 2017, 20:08 | #28 | |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
Quote:
can you list your partition table, format command -> partition -> print ? #1) if the command exists: prtvtoc /dev/rdsk/s0t5d0s2 (s0t5d0s2 as an example) Last edited by emufan; 17 November 2017 at 20:14. |
|
17 November 2017, 20:34 | #29 | |
Registered User
Join Date: Jul 2014
Location: london
Posts: 49
|
Quote:
dd if=/dev/zero of=my-sun3-disk.img bs=1 count=1 seek=201326592 (This is something like 200MBi which was OK for NetBSD anyway) A screenshot of the (very basic) NetBSD edlabel commands params is at https://drive.google.com/file/d/1jxlnaUclGm1h6nXnEsIQW3HQ3omhvi_O/view?usp=sharing I only used 2 partitions /dev/rsd0a for root (4.2BSD) & /dev/rsd0b for swap. rsd0c just means the whole disk. The key thing seemed to be c=NUM, t=0, s=0 for the alignment -- I think the partitions have to be on whole cylinder numbers only. Hopefully SunOS 3 isn't too different! I also set 16MBi memory in the config and EEPROM to resemble the real machine more (but I suspect this isn't needed) Good luck! |
|
17 November 2017, 21:23 | #30 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
just to make it clear, this is netbsd in the screenshot, not SunOS - I'm a bit confused now?
|
17 November 2017, 21:36 | #31 |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,344
|
If you want to experiment with SunOS that's great, but for just trying to get the BCPL compiler working it seems that it runs OK on any M68K NetBSD (including NetBSD/amiga). So there's no benefit to emulated NetBSD/sun3 over NetBSD/amiga in that case.
|
17 November 2017, 22:12 | #32 |
Registered User
Join Date: Jul 2014
Location: london
Posts: 49
|
|
17 November 2017, 22:48 | #33 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
|
18 November 2017, 20:16 | #34 |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,344
|
I've managed to build an Amiga BCPL executable which seems to (at least partly) work!
I built it on NetBSD/amiga. Doing make bcpl.ld builds the executable. Code:
https://www.media!fire.com/file/f8k7dzhroc125st/bcpl_dir_built2.tar.gz bcpl.ld FROM blib.b TO output.o That seemed to work, but I didn't test it any more than that. Some notes: - Do Protect bcpl.ld +E to set the E protection bit otherwise the Amiga shell refuses to run it. - fpsim.asm isn't used so you could delete that. - If you download an Amiga make program, you could try having the Amiga BCPL compiler build itself. That would be a good test. (Or just write an AmigaDOS script to compile and link all files.) |
18 November 2017, 21:20 | #35 | |
Registered User
Join Date: Jul 2014
Location: london
Posts: 49
|
Quote:
|
|
18 November 2017, 21:59 | #36 | |
Registered User
Join Date: Jul 2014
Location: london
Posts: 49
|
Quote:
http://sinclairql.speccy.org/archivo/docs/docs.htm although the quality isn't great. Probably similar to Amiga version. |
|
19 November 2017, 17:08 | #37 |
Registered User
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
|
|
19 November 2017, 18:20 | #38 |
Registered User
Join Date: Jul 2014
Location: london
Posts: 49
|
I managed to compile "hello world" fine and then link with alink to produce an executable which worked. Interestingly BCPL was apparently the first language to use this sort of example.
I also tried the factorial example at https://github.com/stmuk/oldbcplkit/...aster/fact.bpl but couldn't get any output and need to experiment and read more. Interestingly the same example in the old amiga port http://aminet.net/package/dev/lang/BCPL4Amiga doesn't give the correct output since some numbers are negative (probably overflow!). So I don't think this INTCODE based interpreter has been correctly ported anyway. It will be interesting to see if the bcpl.ld one works. |
20 November 2017, 22:37 | #39 |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,344
|
In makefile is this line:
.b.obj:; bcpl $*.b $*.obj opt '"%$$AMIDOS,$$AMIGA,$(BOPTS)"' obj A Is the % symbol a typo? Also do the $$ get changed by make when invoking bcpl? (E.g. changing $$ to $ maybe??? Obviously I'm not an expert on this.) |
20 November 2017, 22:53 | #40 |
Registered User
Join Date: Aug 2004
Location:
Posts: 3,344
|
I tried setting things up to be able to build the BCPL compiler on the Amiga:
Code:
https://www.media!fire.com/file/h4539916bp5gjqj/bcpl_amiga_test_20171120.tar.gz That's with the Amiga bcpl.ld (renamed to bcpl-amiga) I uploaded a couple of days ago. There are three AmigaDOS scripts: BuildIt - Runs assem, CompileB and alink to build bcpl.ld CompileB - this is called from BuildIt for each source file CleanIt - should delete all .obj files However the BCPL compiler dies processing the first source file (start.b). In fact on WinUAE with JIT enabled it actually caused WinUAE to crash. So there's probably something broken or not working about the Amiga-native bcpl.ld/bcpl-amiga. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
native x86 code in WinUAE? | Falk | support.WinUAE | 20 | 21 January 2023 18:30 |
Best way to write native code? | arodgers | support.FS-UAE | 4 | 02 September 2016 19:53 |
FS-UAE Native Code? | jdog320 | support.FS-UAE | 2 | 26 July 2016 11:03 |
amiga c/c++ compiler | Fissuras | request.Apps | 41 | 18 June 2012 20:50 |
Best C Compiler for Amiga is? | Pyromania | Amiga scene | 5 | 14 May 2002 17:17 |
|
|