「シューマン波ジェネレータ」の編集履歴(バックアップ)一覧に戻る
>sdasz80 -o swpg.rel swpg.asm >sdld -i swpg.ihx swpg.rel >hex2bin swpg.ihx >copy swpg.bin swpg.com
;Simple schuman wave pulse generator (audio output ; connects tocoil) ; .area _ASM(abs,con) .org 0x100 ; ld d,#7 ; ld e,#0b00110111 ; call sub_psc ld d,#8 ; ld e,#0x1f ; call sub_psc ld d,#12 ; ;ld e,#0b011 ld e,#0b01 ; call sub_psc ld d,#11 ; ;ld e,#0b10000000 ld e,#0b11000000 ; call sub_psc ld d,#13 ; ld e,#0b1110 call sub_psc ld d,#6 ; ld e,#0 call sub_psc ret ;----- sub_psc: ld c,#0xA0 ;reg number ld a,d out (c),a ld c,#0xA1 ;write ld a,e out (c),a ret
>sdasz80 -o file.rel file.asm >sdld -i file.ihx file.rel >hex2bin file.ihx >copy file.bin file.rom
;Simple schuman wave pulse generator (audio output ; connects tocoil) ;***16KB ROM Cartridge .area _ASM (abs,con) .org 0x4000 ;-----ROM Header .dw "AB" .dw 0x4050 .dw 0,0,0,0,0,0 .dw 0,0,0,0,0,0,0,0 ;-----ROM code section .org 0x4050 start: call 0x006c ;init textmode ld hl,#text1 call sub_puts ;print message ;---enable schuman wave generator ld d,#7 ; ld e,#0b00110111 ; call sub_psc ld d,#8 ; ld e,#0x1f ; call sub_psc ld d,#12 ; ;ld e,#0b011 ld e,#0b01 ;1/2 call sub_psc ld d,#11 ; ;ld e,#0b10000000 ld e,#0b11000000 ;1/2 call sub_psc ld d,#13 ; ld e,#0b1110 call sub_psc ld d,#6 ; ld e,#0 call sub_psc endloop: halt jr endloop ;------ sub_puts: ld a,(HL) push af call 0x00a2 ;call rombios (chput) pop af inc hl ld a,(HL) cp #0 jr nz,sub_puts ret ;-------- sub_psc: ld c,#0xA0 ;reg number ld a,d out (c),a ld c,#0xA1 ;write ld a,e out (c),a ret ;--- text1: .ascii /INIT: ROM BOOT... / .db 0xd,0xa .ascii /INIT: AY38910-S1985/ .db 0xd,0xa .ascii /SchumanPulseGenerator V1.00/ .db 0xd,0xa .ascii /STATUS:Start/ .db 0,0,0