Lesson H6- Hello World on the Camputers Lynx
Lesson H6- Hello World on the Camputers Lynx
http://www.chibiakumas.com/z80/helloworld.php#LessonH6
The Camputers Lynx is one of the more odd 8 bits - getting Hello World on the screen is pretty easy, but due to a lack of tools, making a TAP file is not!
Lets learn how to make Hello World, and turn it into a valid tap file to run on our emulator
Chibi Akuma(s) Comedy-Horror 8-bit Bullet Hell shooter! // 「チビ悪魔」可笑しいゴシックSTG ! // Work in Progress: ChibiAliens
Interested in CPU's :Z80,6502,68000,6809,ARM,8086,RISC-V
Learning: 65816,ARM,8086,6809
						Interested in CPU's :Z80,6502,68000,6809,ARM,8086,RISC-V
Learning: 65816,ARM,8086,6809
Re: Lesson H6- Hello World on the Camputers Lynx
I used sjasm for building .TAP
			
			
									
									
						Code: Select all
	device zxspectrum128
	org $6500-13
tap_b:
;name
	db $22,"NONAME",$22
;type
	db "M"
;program length
	dw end-begin
;load point
	dw begin
	org $6500
begin
	xor a					;By default lynx makes a noise
	out (%10000100),a		;so we mute the noise here!
	
	ld hl,Message			;Address of string
	call PrintString		;Show String to screen
	ret 					;return to basic
	
NewLine:
	ld a,13					;Carriage return
	jp PrintChar
PrintChar:
	rst 8
	ret
	
PrintString:
	ld a,(hl)				;Print a '255' terminated string 
	cp 255
	ret z
	inc hl
	call PrintChar
	jr PrintString
Message: db 'Hello World 323!',255
end
;calc checksum
    LUA
    local checksum
    checksum=0
    for i=sj.get_label("begin"),sj.get_label("end") do
    checksum=checksum+sj.get_byte( i )
    end
--	print("cs:",string.format("%08X",checksum))
	sj.insert_label("CSU", checksum%256)
    ENDLUA
;rest tail
checkd: db CSU,CSU ;checksum LSB two times
;execute point
	dw begin
;high byte of execute point
	db begin/256
tap_e:
;	display /d,end-begin
	savebin "hlw.tap",tap_b,tap_e-tap_b