Skip to content

A Little Bit Of Success

September 12, 2015

I haven’t been able to get output from the compiler to execute yet but to build some confidence I dropped back to a simple assembly language program that outputs crlf,HW,crlf through Josh’s serial routine at 0FE9. I figure I can add stuff till it flakes or becomes the same as the compiler output. Along the way I’ll figure it out.

	.area	_HEADER (ABS)
	.org 	0x8000	;RAM starts at 32K
	LD	SP,#0xFEFE	
	LD	A,#10
	CALL	0x0FE9
	LD	A,#13
	CALL	0x0FE9
	LD	A,#'H'
	CALL	0x0FE9
	LD	A,#'W'
	CALL	0x0FE9
	LD	A,#10
	CALL	0x0FE9
	LD	A,#13
	CALL	0x0FE9
HERE:	JP	HERE	

And the money shot: Pasting the code into josh’s monitor just says no error but “g 8000” starts it and runs the code with output as expected.
15-09-12 HW

Simplifying the output to a single character and putting in the first part of crt0 with the org to 8100 still works:

	.module crt0
	.globl	_main
	.area	_HEADER (ABS)
	.org 	0x8000	;RAM starts at 32K
	jp	init
	.ORG	0X8100
init:	LD	SP,#0xFEFF	
	LD	A,#'!'
	CALL	0x0FE9
HERE:	JP	HERE	

And, adding in the call to main and org to 9000 still works. So all the mechanics of executing code in the 3 locations is fine. more tomorrow.

	.module crt0
	.globl	_main
	.area	_HEADER (ABS)

	.org 	0x8000	;RAM starts at 32K
	jp	init

	.ORG	0X8100
init:	LD	SP,#0xFEFF	
	call	_main

	.org 	0x9000
_main:	LD	A,#'$'
	CALL	0x0FE9
HERE:	JP	HERE	
Advertisements

From → Olduino/Z

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: