English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language

 
 
Thread Tools
Old 16 November 2017, 19:12   #21
steve_mynott
Registered User
 
Join Date: Jul 2014
Location: london
Posts: 49
Quote:
Originally Posted by emufan View Post
thanks. i was missing xlaunch, it does work now.
once started, open new cygwin window, export DISPLAY=0:0
next tmesh.exe <config file> does start

#1) using the howto above, i get a bus error, after format/partitioning *damn* :/
I was trying https://people.csail.mit.edu/fredett...-150-nbsd.html using NetBSD 7.1 on a tme on Ubuntu 16.04.

halted
>b sd(,,1) -s
Boot0,0,1) -s
Invalid Page Bus Error PC Fetch at 0x0E0A4CB4

steve_mynott is offline  
Old 16 November 2017, 20:34   #22
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by steve_mynott View Post
Invalid Page Bus Error PC Fetch at 0x0E0A4CB4
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.
emufan is offline  
Old 17 November 2017, 17:25   #23
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,333
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).
mark_k is online now  
Old 17 November 2017, 18:36   #24
steve_mynott
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:
amigahdr bcpl.020 cg4.b cghdr lex.b revisions SYSHDR-i
args.b blib.b cg5.b first.asm LIBHDR start.b tidyup.b
bassem cg1.b cg6.b fpsim.asm LIBHDR-i syn.b trna.b
BCPHDR cg2.b cg7.b fpsimhdr-i makefile SYNHDR trnb.b
bcpl cg3.b cg8.b last.asm RCS syshdr trnhdr
and rlog now works but maybe some more upper casing needed?

Now getting a "Name not declared - tidyup" error from BCPL
steve_mynott is offline  
Old 17 November 2017, 19:15   #25
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,333
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).
mark_k is online now  
Old 17 November 2017, 19:41   #26
steve_mynott
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?
steve_mynott is offline  
Old 17 November 2017, 19:48   #27
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,333
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/
mark_k is online now  
Old 17 November 2017, 20:08   #28
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by steve_mynott View Post
but I'm now booting in single user mode OK and running the bcpl binaries fine.
no luck here, tried different values, also those predefined.
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.
emufan is offline  
Old 17 November 2017, 20:34   #29
steve_mynott
Registered User
 
Join Date: Jul 2014
Location: london
Posts: 49
Quote:
Originally Posted by emufan View Post
no luck here, tried different values, also those predefined.
can you list your partition table, format command -> partition -> print ?

#1) if the command exists: prtvtoc /dev/rdsk/s0t5d0s2 (s0t5d0s2 as an example)
Image created with

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!
steve_mynott is offline  
Old 17 November 2017, 21:23   #30
emufan
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?
emufan is offline  
Old 17 November 2017, 21:36   #31
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,333
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.
mark_k is online now  
Old 17 November 2017, 22:12   #32
steve_mynott
Registered User
 
Join Date: Jul 2014
Location: london
Posts: 49
Quote:
Originally Posted by emufan View Post
just to make it clear, this is netbsd in the screenshot, not SunOS - I'm a bit confused now?
Yes but I'm guessing the disk should be partitioned in a similar way! They are probably quite similar.

I think we were seeing the same error from the Sun Openboot.
steve_mynott is offline  
Old 17 November 2017, 22:48   #33
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by steve_mynott View Post
Yes but I'm guessing the disk should be partitioned in a similar way! They are probably quite similar.

I think we were seeing the same error from the Sun Openboot.
ok, ic. I finaly could build this tme emulator, but now the next problem. :/
emufan is offline  
Old 18 November 2017, 20:16   #34
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,333
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
I tried running the Amiga executable like this:
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.)
mark_k is online now  
Old 18 November 2017, 21:20   #35
steve_mynott
Registered User
 
Join Date: Jul 2014
Location: london
Posts: 49
Quote:
Originally Posted by mark_k View Post
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
I tried running the Amiga executable like this:
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.)
Thanks! That's great! I'll give it ago.
steve_mynott is offline  
Old 18 November 2017, 21:59   #36
steve_mynott
Registered User
 
Join Date: Jul 2014
Location: london
Posts: 49
Quote:
Originally Posted by emufan View Post
zoned:
MetaComco-Collection.zip
Lisp Pascal Toolkit Assembler ABasic Shell

the lisp disk comes with df0:L/Lisp/BCPLread and some tools ( df0:c/download )
to transfer "Sun" files (readable text in the binary).
filestamps from nov 1985.

#1) is there an ebook / manual for MCC Lisp?
There are the QL manuals for MCC BCPL and LISP at

http://sinclairql.speccy.org/archivo/docs/docs.htm

although the quality isn't great. Probably similar to Amiga version.
steve_mynott is offline  
Old 19 November 2017, 17:08   #37
emufan
Registered User
 
Join Date: Feb 2012
Location: #DrainTheSwamp
Posts: 4,545
Quote:
Originally Posted by steve_mynott View Post
There are the QL manuals for MCC BCPL and LISP at
thanks for the link.
emufan is offline  
Old 19 November 2017, 18:20   #38
steve_mynott
Registered User
 
Join Date: Jul 2014
Location: london
Posts: 49
Quote:
Originally Posted by steve_mynott View Post
Thanks! That's great! I'll give it ago.
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.
steve_mynott is offline  
Old 20 November 2017, 22:37   #39
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,333
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.)
mark_k is online now  
Old 20 November 2017, 22:53   #40
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 3,333
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
Upack that on the Amiga using this version of tar to preserve file protection bits.

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.
mark_k is online now  
 


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 20:38.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.10269 seconds with 14 queries