Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disdump, limbo, wm/rt: assembly output doesn't work with asm(1) #8

Open
mehlon opened this issue Oct 13, 2019 · 0 comments
Open

disdump, limbo, wm/rt: assembly output doesn't work with asm(1) #8

mehlon opened this issue Oct 13, 2019 · 0 comments

Comments

@mehlon
Copy link
Contributor

mehlon commented Oct 13, 2019

It'd be nice if the files generated by disdump(1), limbo(1) and wm/rt(1) could be readily built with asm(1). However this currently doesn't work, because these programs don't always spit out valid syntax.
Disdump only outputs the instructions, but not additional linker directives.
For instance: disdump generates this for /dis/pause.dis:

newcw     , $0, 44(fp)
recv      44(fp), 40(fp)
movp      0(mp), 44(fp)
ret       

limbo -S /appl/cmd/pause.b generates this:

#0
	newcw	$0,44(fp)
	recv	44(fp),40(fp)
	movp	0(mp),44(fp)
	ret	
	entry	0, 1
	desc	$0,4,"80"
	desc	$1,48,"00d0"
	var	@mp,4
	module	Pause
	link	1,0,0x4244b354,"init"
	ldts	@ldt,0
	source	"/appl/cmd/pause.b"

wm/rt generates this if you select "Write .s file":

#0
	newcw     , $0, 44(fp)
	recv      44(fp), 40(fp)
	movp      0(mp), 44(fp)
	ret       
	entry	0,1
	desc $0, 4, "80"
	desc $1, 48, "00d0"
	var @mp, 4
	module	Pause
	link 1,0, 0x4244b354, "init"

The code from disdump cannot be built with asm(1) because there's a syntax error on the first line.
The line should be newcw 44(fp)
The code from limbo -S has the same syntax error.
The code from wm/rt also has this error.

Using code from wm/rt would be useful here.

@mehlon mehlon changed the title disdump(1): output doesn't work with asm(1) disdump, limbo, wm/rt: assembly output doesn't work with asm(1) Oct 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant