{"id":2124,"date":"2026-10-19T17:50:31","date_gmt":"2026-10-19T16:50:31","guid":{"rendered":"https:\/\/blog.univ-angers.fr\/mathsinfo\/?p=2124"},"modified":"2026-10-19T19:20:16","modified_gmt":"2026-10-19T18:20:16","slug":"quelques-outils-utiles-pour-le-kim-1","status":"publish","type":"post","link":"https:\/\/blog.univ-angers.fr\/mathsinfo\/2026\/10\/19\/quelques-outils-utiles-pour-le-kim-1\/","title":{"rendered":"Quelques outils pour le KIM-1"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Assembleur 6502 : <a href=\"https:\/\/www.masswerk.at\/6502\/assembler.html\">https:\/\/www.masswerk.at\/6502\/assembler.html<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Petit \u00e9mulateur : <a href=\"https:\/\/github.com\/EricSchraf\/kim1\">https:\/\/github.com\/EricSchraf\/kim1<\/a>(choisir <strong>&lt;code&gt; &#8211; Download Zip &#8211; D\u00e9zippez<\/strong> et lancez <strong>index.html<\/strong>)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Vous pouvez \u00e9galement le tester ici : <a href=\"http:\/\/schraf.chez-alice.fr\/kim1\/\">http:\/\/schraf.chez-alice.fr\/kim1\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Raccourcis clavier de l&rsquo;\u00e9mulateur <strong>0-9<\/strong>, <strong>A-F<\/strong> : chiffres hexad\u00e9cimaux <strong>Espace<\/strong> : AD <strong>\u00b7<\/strong> <strong>,<\/strong> : DA \u00b7 <strong>Entr\u00e9e<\/strong> ou <strong>+<\/strong> : + \u00b7 <strong>G<\/strong> : GO \u00b7 <strong>S<\/strong> : ST \u00b7 <strong>R<\/strong> : RS \u00b7 <strong>P<\/strong> : PC<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Inspir\u00e9 par celui-ci : <a href=\"https:\/\/maksimkorzh.github.io\/KIM-1\/\">https:\/\/maksimkorzh.github.io\/KIM-1\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Trouver un KIM-1 : <a href=\"https:\/\/www.vinted.fr\/catalog?search_text=MOS%20KIM-1\">https:\/\/www.vinted.fr\/catalog?search_text=MOS%20KIM-1<\/a> | <a href=\"https:\/\/www.ebay.fr\/sch\/i.html?_nkw=kim+uno+clone\">https:\/\/www.ebay.fr\/sch\/i.html?_nkw=kim+uno+clone<\/a><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Programmes vus dans la vid\u00e9o<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Fibonnaci<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>debut:  LDA #$00\n        STA $F9        ; a (affich\u00e9)\n        LDA #$01\n        STA $02        ; b\n        CLC\nsuite:  LDA #$40       ; dur\u00e9e d'affichage\n        STA $01\n        PHP            ; PUSH drapeaux\naff:    JSR $1F1F      ; SCANDS\n        DEC $01\n        BNE aff        ; Branch if Not Equal\n        PLP            ; PULL drapeaux\n        BCS debut      ; Branch if C = 1\n        LDA $F9\n        ADC $02        ; a+b\n        LDX $02\n        STX $F9        ; a = b\n        STA $02        ; b = a+b\n        JMP suite\n\n\n @0200 A90085F9A901850218A940850108201F1FC601D0F928B0E8\n @0218 A5F96502A60286F985024C09020000000000000000000000\n ;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">COMPTEUR<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code> * = $0200\n\n        LDA #$00    ; A = 0\n        STA $F9     ; compteur affich\u00e9 (INH) = 00\ndebut:  LDA #$40    ; dur\u00e9e affichage\n        STA $01     ; compteur de temporisation\nboucle: JSR $1F1F   ; rafra\u00eechit l'afficheur\n        DEC $01     ; une passe de moins\n        BNE boucle  ; on r\u00e9p\u00e8te jusqu'\u00e0 0\n        SED         ; SEt Decimal mode (BCD)\n        LDA $F9     ; lit le compteur\n        CLC         ; efface retenue avant addition\n        ADC #$01    ; +1 en BCD (09 \u2192 10, 99 \u2192 00)\n        CLD         ; CLear Decimal mode\n        STA $F9     ; range le nouveau compteur\n        JMP debut   ; recommence une seconde\n\n @0200 A90085F9A9408501201F1FC601D0F9F8A5F9186901D885F9\n @0218 4C040200\n ;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">CLIGNOTANT 88<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code> * = $0200\n\ndebut:  LDA #$88\n        STA $F9          ; INH   : 2 digits de droite\n        STA $FA          ; POINTL: 2 digits du milieu\n        STA $FB          ; POINTH: 2 digits de gauche\n        LDA #$10         ; dur\u00e9e d'allumage\n        STA $01\nallume: JSR $1F1F        ; SCANDS : affiche 888888\n        DEC $01\n        BNE allume\n        LDA #$00\n        STA $1740        ; SAD = Segment Address Data = 0 : segments \u00e9teints\n        LDY #$20         ; dur\u00e9e d'extinction = 20\u00d7FF\next1:   LDX #$FF\next2:   DEX\n        BNE ext2\n        DEY\n        BNE ext1\n        JMP debut\n\n @0200 A98885F985FA85FBA9408501201F1FC601D0F9A97F8D4117\n @0218 A2098E4217A9008D4017E8E8E015D0F2A0FFA2FFCAD0FD88\n @0230 D0F84C0002\n ;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">D\u00c9TECTION DES TOUCHES<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code> @0200 A90085F9206A1FC915B00285F9201F1F4C0402\n ;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">LANCER D&rsquo;UN D\u00c9<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code> @0200 A900850085F9E600A500C9069004A9008500206A1FC915B0\n @0218 07A50018690185F9201F1F4C0602\n ;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">NOMBRE DE 4 CHIFFRES<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>        LDA #$00       ; A = 0\n        STA $FA        ; dizaines\/unit\u00e9s = 00\n        STA $FB        ; milliers\/centaines = 00\ndebut:  JSR $1F1F      ; SCANDS : rafra\u00eechit l'afficheur\n        JSR $1F6A      ; GETKEY\n        CMP #$04\n        BCS debut      ; touche &gt; 3 ou pas de touche : on ignore\n        STA $00        ; m\u00e9morise la touche (0 \u00e0 3)\n        LSR A          ; 0,1 -&gt; 0 ; 2,3 -&gt; 1\n        EOR #$01       ; 0,1 -&gt; 1 ; 2,3 -&gt; 0\n        TAX            ; X=1 : octet $FB ; X=0 : octet $FA\n        LDA $00\n        AND #$01       ; 0 = chiffre de gauche de l'octet, 1 = chiffre de droite:\n        BNE bas\n        SED            ; touches 0 et 2 : +1 sur le chiffre de gauche\n        LDA $FA,X\n        CLC\n        ADC #$10       ; en BCD : 9 + 1 -&gt; 0, sans toucher l'autre chiffre\n        CLD\n        STA $FA,X\n        JMP att\n\nbas:    LDA $FA,X      ; touches 1 et 3\n        AND #$0F\n        CMP #$09       ; d\u00e9j\u00e0 \u00e0 9 ?\n        BEQ rz\n        INC $FA,X      ; non : +1\n        JMP att\nrz:     LDA $FA,X      ; oui : retour \u00e0 0\n        AND #$F0\n        STA $FA,X\natt:    JSR $1F1F      ; attend le rel\u00e2chement de la touche\n        JSR $1F6A      ; (un appui = un seul incr\u00e9ment)\n        CMP #$15\n        BCC att        ; touche encore enfonc\u00e9e\n        JMP debut\n\n\n @0200 A90085FA85FB201F1F206A1FC904B0F685004A4901AAA500\n @0218 2901D00CF8B5FA186910D895FA4C3B02B5FA290FC909F005\n @0230 F6FA4C3B02B5FA29F095FA201F1F206A1FC91590F64C0602\n ;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Assembleur 6502 : https:\/\/www.masswerk.at\/6502\/assembler.html Petit \u00e9mulateur : https:\/\/github.com\/EricSchraf\/kim1(choisir &lt;code&gt; &#8211; Download Zip &#8211; D\u00e9zippez et lancez index.html) Vous pouvez \u00e9galement le tester ici : http:\/\/schraf.chez-alice.fr\/kim1\/ Raccourcis clavier de l&rsquo;\u00e9mulateur 0-9, A-F : chiffres hexad\u00e9cimaux Espace : AD \u00b7 , : &hellip; <a href=\"https:\/\/blog.univ-angers.fr\/mathsinfo\/2026\/10\/19\/quelques-outils-utiles-pour-le-kim-1\/\">Continuer la lecture <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":4913,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-2124","post","type-post","status-publish","format-standard","hentry","category-youtube"],"_links":{"self":[{"href":"https:\/\/blog.univ-angers.fr\/mathsinfo\/wp-json\/wp\/v2\/posts\/2124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.univ-angers.fr\/mathsinfo\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.univ-angers.fr\/mathsinfo\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.univ-angers.fr\/mathsinfo\/wp-json\/wp\/v2\/users\/4913"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.univ-angers.fr\/mathsinfo\/wp-json\/wp\/v2\/comments?post=2124"}],"version-history":[{"count":6,"href":"https:\/\/blog.univ-angers.fr\/mathsinfo\/wp-json\/wp\/v2\/posts\/2124\/revisions"}],"predecessor-version":[{"id":2132,"href":"https:\/\/blog.univ-angers.fr\/mathsinfo\/wp-json\/wp\/v2\/posts\/2124\/revisions\/2132"}],"wp:attachment":[{"href":"https:\/\/blog.univ-angers.fr\/mathsinfo\/wp-json\/wp\/v2\/media?parent=2124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.univ-angers.fr\/mathsinfo\/wp-json\/wp\/v2\/categories?post=2124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.univ-angers.fr\/mathsinfo\/wp-json\/wp\/v2\/tags?post=2124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}