14Fermer16
chickendudeLe 19/06/2011 à 19:32
Je ne sais pas pourquoi mon code ne marche pas, l'interruption se charge sans problèmes et même s'exécute à chaque interruption, mais paraît ne rien faire. Peut-être c'est l'emulateur qui en est responsable, mais j'en doute... Je n'ai pas de calc pour l'essayer, si tu veux, voici le code héxa:
CDDC4ECDFC4E1D2803ED56C9F32100841101840100013682EDB0215493118282010B00EDB03E84ED47ED5EFBC9D908DB03E6FED303C33A00(n'oublie pas le "End:0000:End")

_RCLANS		=	4EDCh
_CONVOP1	=	4EFCh

.org $9327

	call _RCLANS
	call _CONVOP1
	dec e
	jr z,instaler_interruption
;sinon, l'enlever
	im 1
	ret
instaler_interruption:
	di
	ld hl,$8400
	ld de,$8401
	ld bc,256
	ld (hl),$82
	ldir

	ld	hl,debut_interruption
	ld	de,$8282
	ld	bc,fin_interruption-debut_interruption
	ldir
	ld	a,$84
	ld	i,a
	im	2
	ei
	ret

debut_interruption:
	exx
	ex af,af'
	in a,($03)		;port 3: port des interruptions
	and %11111110	;bit 0 = 1 si "On" est pousse
	out ($03),a		;changer bit 0 à 0
	jp $003A		;aller à l'interruption de la calc
fin_interruption:
.end