BCALL étudié avec un débuggueur
2 participants
Espace TI: Forum :: Calculatrices & Hardware :: Questions sur les calculatrices :: Questions sur la TI-83+ et la TI-84+
Page 1 sur 1
BCALL étudié avec un débuggueur
Est-ce que quelqu'un a la moindre idée de l'utilité de la romcall 28h ? C'est celle qu'on appelle via la commande "rst 28h" contenu dans la macro bcall().
rst a le même effet que call, mais permet d'accéder à des adresses prédéfinies (et invariables) de la mémoire avec un codage hexadécimal optimisé.
Il se trouve que l'adresse 28h en question renvoie vers 2A84h, puis un algorithme compliqué s'en suit...
rst a le même effet que call, mais permet d'accéder à des adresses prédéfinies (et invariables) de la mémoire avec un codage hexadécimal optimisé.
Il se trouve que l'adresse 28h en question renvoie vers 2A84h, puis un algorithme compliqué s'en suit...
- Spoiler:
- 0028:c3842a: jp $2A84 ;3 bytes 10 clocks
------------------------
26C1:cddc26: call $26DC ;3 bytes 17 clocks
26C4:2804: jr z,$26CA ;2 bytes 12/7 clocks
26C6:e61f: and 31 ;2 bytes 4 clocks
26C8:1807: jr $26D1 ;2 bytes 12 clocks
26CA:cdd426: call $26D4 ;3 bytes 17 clocks
26CD:2002: jr nz,$26D1 ;2 bytes 12/7 clocks
26CF:e63f: and 63 ;2 bytes 4 clocks
26D1:d306: out ($06),a ;2 bytes 11 clocks
26D3:c9: ret ;1 bytes 10 clocks
26D4:c5: push bc ;1 bytes 11 clocks
26D5:f5: push af ;1 bytes 11 clocks
26D6:db21: in a,($21) ;2 bytes 11 clocks
26D8:e603: and 3 ;2 bytes 4 clocks
26DA:1808: jr $26E4 ;2 bytes 12 clocks
26DC:c5: push bc ;1 bytes 11 clocks
26DD:f5: push af ;1 bytes 11 clocks
26DE:db02: in a,($02) ;2 bytes 11 clocks
26E0:e680: and 128 ;2 bytes 4 clocks
26E2:ee80: xor 128 ;2 bytes 4 clocks
26E4:c1: pop bc ;1 bytes 10 clocks
26E5:78: ld a,b ;1 bytes 4 clocks
26E6:c1: pop bc ;1 bytes 10 clocks
26E7:c9: ret ;1 bytes 10 clocks
-----------------------
2A84:e5: push hl ;1 bytes 11 clocks
2A85:e5: push hl ;1 bytes 11 clocks
2A86:e5: push hl ;1 bytes 11 clocks
2A87:f5: push af ;1 bytes 11 clocks
2A88:c5: push bc ;1 bytes 11 clocks
2A89:d5: push de ;1 bytes 11 clocks
2A8A:e5: push hl ;1 bytes 11 clocks
2A8B:210f00: ld hl,$0F ;3 bytes 10 clocks
2A8E:39: add hl,sp ;1 bytes 11 clocks
2A8F:56: ld d,(hl) ;1 bytes 7 clocks
2A90:2b: dec hl ;1 bytes 6 clocks
2A91:5e: ld e,(hl) ;1 bytes 7 clocks
2A92:13: inc de ;1 bytes 6 clocks
2A93:13: inc de ;1 bytes 6 clocks
2A94:73: ld (hl),e ;1 bytes 7 clocks
2A95:23: inc hl ;1 bytes 6 clocks
2A96:72: ld (hl),d ;1 bytes 7 clocks
2A97:db06: in a,($06) ;2 bytes 11 clocks
2A99:4f: ld c,a ;1 bytes 4 clocks
2A9A:2b: dec hl ;1 bytes 6 clocks
2A9B:2b: dec hl ;1 bytes 6 clocks
2A9C:2b: dec hl ;1 bytes 6 clocks
2A9D:77: ld (hl),a ;1 bytes 7 clocks
2A9E:2b: dec hl ;1 bytes 6 clocks
2A9F:362b: ld (hl),$2B ;2 bytes 10 clocks
2AA1:2b: dec hl ;1 bytes 6 clocks
2AA2:3696: ld (hl),$96 ;2 bytes 10 clocks
2AA4:1b: dec de ;1 bytes 6 clocks
2AA5:eb: ex de,hl ;1 bytes 4 clocks
2AA6:56: ld d,(hl) ;1 bytes 7 clocks
2AA7:2b: dec hl ;1 bytes 6 clocks
2AA8:5e: ld e,(hl) ;1 bytes 7 clocks
2AA9:0600: ld b,$00 ;2 bytes 7 clocks
2AAB:cb7a: bit 7,d ;2 bytes 8 clocks
2AAD:200a: jr nz,$2AB9 ;2 bytes 12/7 clocks
2AAF:cb72: bit 6,d ;2 bytes 8 clocks
2AB1:280c: z,$2ABF ;2 bytes 12/7 clocks
2AB3:cbb2: res 6,d ;2 bytes 8 clocks
2AB5:3e7b: ld a,$7B ;2 bytes 7 clocks
2AB7:1809: jr $2AC2 ;2 bytes 12 clocks
2AB9:cbba: res 7,d ;2 bytes 8 clocks
2ABB:3e7f: ld a,$7F ;2 bytes 7 clocks
2ABD:1803: jr $2AC2 ;2 bytes 12 clocks
2ABF:cd2f2b: call $2B2F ;3 bytes 17 clocks
2AC2:cdc126: call $26C1 ;3 bytes 17 clocks
2AC5:210040: ld hl,$4000 ;3 bytes 10 clocks
2AC8:19: add hl,de ;1 bytes 11 clocks
2AC9:5d: ld e,l ;1 bytes 4 clocks
2ACA:54: ld d,h ;1 bytes 4 clocks
2ACB:210800: ld hl,$08 ;3 bytes 10 clocks
2ACE:39: add hl,sp ;1 bytes 11 clocks
2ACF:1a: ld a,(de) ;1 bytes 7 clocks
2AD0:77: ld (hl),a ;1 bytes 7 clocks
2AD1:13: inc de ;1 bytes 6 clocks
2AD2:23: inc hl ;1 bytes 6 clocks
2AD3:1a: ld a,(de) ;1 bytes 7 clocks
2AD4:77: ld (hl),a ;1 bytes 7 clocks
2AD5:13: inc de ;1 bytes 6 clocks
2AD6:78: ld a,b ;1 bytes 4 clocks
2AD7:b7: or a ;1 bytes 4 clocks
2AD8:2806: jr z,$2AE0 ;2 bytes 12/7 clocks
2ADA:1a: ld a,(de) ;1 bytes 7 clocks
2ADB:ed44: neg ;2 bytes 8 clocks
2ADD:80: add a,b ;1 bytes 4 clocks
2ADE:1805: jr $2AE5 ;2 bytes 12 clocks
2AE0:1a: ld a,(de) ;1 bytes 7 clocks
2AE1:b7: or a ;1 bytes 4 clocks
2AE2:2001: jr nz,$2AE5 ;2 bytes 12/7 clocks
2AE4:79: ld a,c ;1 bytes 4 clocks
2AE5:cdc126: call $26C1 ;3 bytes 17 clocks
2AE8:e1: pop hl ;1 bytes 10 clocks
2AE9:d1: pop de ;1 bytes 10 clocks
2AEA:c1: pop bc ;1 bytes 10 clocks
2AEB:f1: pop af ;1 bytes 10 clocks
2AEC:c9: ret ;1 bytes 10 clocks
--------------------
2B2F:db06: in a,($06) ;2 bytes 11 clocks
2B31:210080: ld hl,$8000 ;3 bytes 10 clocks
2B34:85: add a,l ;1 bytes 4 clocks
2B35:6f: ld l,a ;1 bytes 4 clocks
2B36:3001: jr nc,$2B39 ;2 bytes 12/7 clocks
2B38:24: inc h ;1 bytes 4 clocks
2B39:32eb83: ld ($83EB),a ;3 bytes 13 clocks
2B3C:ed57: ld a,i ;2 bytes 9 clocks
2B3E:ea432b: jp pe,$2B43 ;3 bytes 10 clocks
2B41:ed57: ld a,i ;2 bytes 9 clocks
2B43:f3: di ;1 bytes 4 clocks
2B44:f5: push af ;1 bytes 11 clocks
2B45:3aeb83: ld a,($83EB) ;3 bytes 13 clocks
2B48:3e83: ld a,$83 ;2 bytes 7 clocks
2B4A:d307: out ($07),a ;2 bytes 11 clocks
2B4C:46: ld b,(hl) ;1 bytes 7 clocks
2B4D:3e81: ld a,$81 ;2 bytes 7 clocks
2B4F:d307: out ($07),a ;2 bytes 11 clocks
2B51:32eb83: ld ($83EB),a ;3 bytes 13 clocks
2B54:f1: pop af ;1 bytes 10 clocks
2B55:e2592b: jp po,$2B59 ;3 bytes 10 clocks
2B58:fb: ei ;1 bytes 4 clocks
2B59:3aeb83: ld a,($83EB) ;3 bytes 13 clocks
2B5C:78: ld a,b ;1 bytes 4 clocks
2B5D:c9: ret ;1 bytes 10 clocks
Dernière édition par linkakro le Ven 27 Juil - 16:44, édité 1 fois
linkakro- Or 4
- Sexe :
Age : 30
Messages : 768
Date d'inscription : 01/07/2010
Etudes : dut geii (elec/info)
Points Forum : 51
Points Concours : 8
Langages :- - TI-Basic Z80
- - ASM TI-82 Stats / TI-83
- - ASM TI-83+ / TI-84+
- - TI-82 Stats.fr
- - TI-84 Pocket.fr
nikitouzz- Platinum 1
- Sexe :
Age : 28
Messages : 1834
Date d'inscription : 16/01/2011
Points Forum : 7
Points Concours : 6
Langages :- - TI-Basic Z80
- - ASM TI-83+ / TI-84+
- - Axe Parser
- - TI-Basic 68K
- - TI-Basic Nspire
- - TI-73
- - TI-76.fr
- - TI-82 Stats.fr
- - TI-83+
- - TI-84+
- - TI-92
- - TI-Nspire
- - TI-Nspire CX
Espace TI: Forum :: Calculatrices & Hardware :: Questions sur les calculatrices :: Questions sur la TI-83+ et la TI-84+
Page 1 sur 1
Permission de ce forum:
Vous ne pouvez pas répondre aux sujets dans ce forum
|
|