<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://retroprogramming.iwashere.eu/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://retroprogramming.iwashere.eu/feed.php">
        <title>Retroprogramming by spotlessmind1975 it:mt6502</title>
        <description></description>
        <link>https://retroprogramming.iwashere.eu/</link>
        <image rdf:resource="https://retroprogramming.iwashere.eu/lib/tpl/dokuwiki/images/favicon.ico" />
       <dc:date>2026-05-26T18:54:23+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://retroprogramming.iwashere.eu/it:mt6502:blocking?rev=1612110416&amp;do=diff"/>
                <rdf:li rdf:resource="https://retroprogramming.iwashere.eu/it:mt6502:coordinate?rev=1612110392&amp;do=diff"/>
                <rdf:li rdf:resource="https://retroprogramming.iwashere.eu/it:mt6502:defining?rev=1612110363&amp;do=diff"/>
                <rdf:li rdf:resource="https://retroprogramming.iwashere.eu/it:mt6502:helloworld?rev=1612110465&amp;do=diff"/>
                <rdf:li rdf:resource="https://retroprogramming.iwashere.eu/it:mt6502:locals?rev=1612110451&amp;do=diff"/>
                <rdf:li rdf:resource="https://retroprogramming.iwashere.eu/it:mt6502:midres?rev=1612110493&amp;do=diff"/>
                <rdf:li rdf:resource="https://retroprogramming.iwashere.eu/it:mt6502:walking?rev=1606862602&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://retroprogramming.iwashere.eu/lib/tpl/dokuwiki/images/favicon.ico">
        <title>Retroprogramming by spotlessmind1975</title>
        <link>https://retroprogramming.iwashere.eu/</link>
        <url>https://retroprogramming.iwashere.eu/lib/tpl/dokuwiki/images/favicon.ico</url>
    </image>
    <item rdf:about="https://retroprogramming.iwashere.eu/it:mt6502:blocking?rev=1612110416&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-01-31T17:26:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>it:mt6502:blocking</title>
        <link>https://retroprogramming.iwashere.eu/it:mt6502:blocking?rev=1612110416&amp;do=diff</link>
        <description>Multithreading sui retrocomputer

FUNZIONI BLOCCANTI E NON BLOCCANTI

Un protothread viene eseguito all'interno di una singola funzione C e non può estendersi su altre funzioni. Può, ovviamente, chiamare normali funzioni C ma, al tempo stesso, non può</description>
    </item>
    <item rdf:about="https://retroprogramming.iwashere.eu/it:mt6502:coordinate?rev=1612110392&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-01-31T17:26:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>it:mt6502:coordinate</title>
        <link>https://retroprogramming.iwashere.eu/it:mt6502:coordinate?rev=1612110392&amp;do=diff</link>
        <description>Multithreading sui retrocomputer

COORDINARE I PROTOTHREAD

I protothread sono dei thread che vengono eseguiti in un contesto di multithreading cooperativo. I programmi cedono volontariamente il controllo una volta finita l'operazione in corso. Più precisamente, lo scheduler passa il controllo ad un altro thread solo in tre casi specifici:</description>
    </item>
    <item rdf:about="https://retroprogramming.iwashere.eu/it:mt6502:defining?rev=1612110363&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-01-31T17:26:03+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>it:mt6502:defining</title>
        <link>https://retroprogramming.iwashere.eu/it:mt6502:defining?rev=1612110363&amp;do=diff</link>
        <description>Multithreading sui retrocomputer

COME DEFINIRE UN PROTOTHREAD

Il vantaggio principale dei protothread rispetto ai thread ordinari è che sono davvero leggeri: tutti i protothread sono eseguiti sullo stesso stack, e il cambio di contesto coincide con il riavvolgimento dello stack.</description>
    </item>
    <item rdf:about="https://retroprogramming.iwashere.eu/it:mt6502:helloworld?rev=1612110465&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-01-31T17:27:45+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>it:mt6502:helloworld</title>
        <link>https://retroprogramming.iwashere.eu/it:mt6502:helloworld?rev=1612110465&amp;do=diff</link>
        <description>Multithreading sui retrocomputer

&quot;HELLO WORLD&quot; CON DUE PROTOTHREAD

Il codice su tutorial_protothread1.c mostra come realizzare due thread che, in concorrenza, accederanno alla CPU per stampare la scritta “Hello world”. Per distinguerli, aggiungeremo il numero del protothread in fondo.</description>
    </item>
    <item rdf:about="https://retroprogramming.iwashere.eu/it:mt6502:locals?rev=1612110451&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-01-31T17:27:31+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>it:mt6502:locals</title>
        <link>https://retroprogramming.iwashere.eu/it:mt6502:locals?rev=1612110451&amp;do=diff</link>
        <description>Multithreading sui retrocomputer

COME GESTIRE LE VARIABILI LOCALI

Poiché i protothread non salvano il contesto dello stack, le variabili locali non sono conservate quando il protothread si blocca. Più correttamente, il valore di tali variabili locali non è definito.</description>
    </item>
    <item rdf:about="https://retroprogramming.iwashere.eu/it:mt6502:midres?rev=1612110493&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-01-31T17:28:13+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>it:mt6502:midres</title>
        <link>https://retroprogramming.iwashere.eu/it:mt6502:midres?rev=1612110493&amp;do=diff</link>
        <description>Multithreading sui retrocomputer

COME SONO IMPLEMENTATI NELLA MIDRES LIBRARY?

I protothread sono implementati con delle macro, usando le cosidette “continuazioni locali” (local continuations). Inoltre, possono essere usati anche in modo indipendente dalle primitive grafiche.</description>
    </item>
    <item rdf:about="https://retroprogramming.iwashere.eu/it:mt6502:walking?rev=1606862602&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-12-01T23:43:22+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>it:mt6502:walking</title>
        <link>https://retroprogramming.iwashere.eu/it:mt6502:walking?rev=1606862602&amp;do=diff</link>
        <description>Multithreading sui retrocomputer 6502/6510

ANIMAZIONI CON I PROTOTHREAD

Il codice su tutorial_protothread2.c mostra come realizzare una animazione con diversi attori autonomi, ognuno gestito da un thread separato.

Non commenteremo ogni singola riga ma ci limiteremo a segnalare alcun punti fondamentali, da approfondire. In particolare questo tutorial sfrutta i tiles e il motore di rendering realizzato per il gioco</description>
    </item>
</rdf:RDF>
