<?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 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-11T16:05:58+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://retroprogramming.iwashere.eu/mt6502:blocking?rev=1612110405&amp;do=diff"/>
                <rdf:li rdf:resource="https://retroprogramming.iwashere.eu/mt6502:coordinate?rev=1612110378&amp;do=diff"/>
                <rdf:li rdf:resource="https://retroprogramming.iwashere.eu/mt6502:defining?rev=1612110358&amp;do=diff"/>
                <rdf:li rdf:resource="https://retroprogramming.iwashere.eu/mt6502:helloworld?rev=1606860136&amp;do=diff"/>
                <rdf:li rdf:resource="https://retroprogramming.iwashere.eu/mt6502:locals?rev=1612110438&amp;do=diff"/>
                <rdf:li rdf:resource="https://retroprogramming.iwashere.eu/mt6502:midres?rev=1612110481&amp;do=diff"/>
                <rdf:li rdf:resource="https://retroprogramming.iwashere.eu/mt6502:walking?rev=1606859883&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/mt6502:blocking?rev=1612110405&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-01-31T17:26:45+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mt6502:blocking</title>
        <link>https://retroprogramming.iwashere.eu/mt6502:blocking?rev=1612110405&amp;do=diff</link>
        <description>Multithreading on retrocomputers

BLOCKING AND NON-BLOCKING FUNCTIONS

A protothread runs inside a single C function and cannot “span” on other functions. It can, of course, call normal C functions but, at the same time, it cannot block inside a called function.</description>
    </item>
    <item rdf:about="https://retroprogramming.iwashere.eu/mt6502:coordinate?rev=1612110378&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-01-31T17:26:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mt6502:coordinate</title>
        <link>https://retroprogramming.iwashere.eu/mt6502:coordinate?rev=1612110378&amp;do=diff</link>
        <description>Multithreading on retrocomputers

COORDINATE THE PROTOTHREADS

Protothreads are threads that run in a cooperative multithreading context. Protothreads voluntarily relinquish control once the current operation is over. More precisely, the scheduler passes control to another thread only in three cases:</description>
    </item>
    <item rdf:about="https://retroprogramming.iwashere.eu/mt6502:defining?rev=1612110358&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-01-31T17:25:58+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mt6502:defining</title>
        <link>https://retroprogramming.iwashere.eu/mt6502:defining?rev=1612110358&amp;do=diff</link>
        <description>Multithreading on retrocomputers

HOW TO DEFINE A PROTOTHREAD

The main advantage of protothreads over ordinary threads is that they are really lightweight: all protothreads run on the same stack, and the context switch coincides with the “rewind”</description>
    </item>
    <item rdf:about="https://retroprogramming.iwashere.eu/mt6502:helloworld?rev=1606860136&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-12-01T23:02:16+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mt6502:helloworld</title>
        <link>https://retroprogramming.iwashere.eu/mt6502:helloworld?rev=1606860136&amp;do=diff</link>
        <description>Multithreading on 6502/6510 retrocomputers

&quot;HELLO WORLD&quot; WITH TWO PROTOTHREADS

The code on tutorial_protothread1.c shows how to make two threads that, in competition, will access the CPU to print “Hello world”. To tell them apart, we'll add the protothread number at the bottom.</description>
    </item>
    <item rdf:about="https://retroprogramming.iwashere.eu/mt6502:locals?rev=1612110438&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-01-31T17:27:18+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mt6502:locals</title>
        <link>https://retroprogramming.iwashere.eu/mt6502:locals?rev=1612110438&amp;do=diff</link>
        <description>Multithreading on retrocomputers

HOW TO MANAGE LOCAL VARIABLES

Since protothreads do not save stack context, local variables are not preserved when protothread hangs. More correctly, the value of these local variables is undefined.

This code, therefore, will never be able to run or compile correctly:</description>
    </item>
    <item rdf:about="https://retroprogramming.iwashere.eu/mt6502:midres?rev=1612110481&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-01-31T17:28:01+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mt6502:midres</title>
        <link>https://retroprogramming.iwashere.eu/mt6502:midres?rev=1612110481&amp;do=diff</link>
        <description>Multithreading on retrocomputers

HOW ARE THEY IMPLEMENTED IN THE MIDRES LIBRARY?

Protothreads are implemented with macros that represent “annotations”, using so-called “local continuations”. Furthermore, they can also be used independently of MIDRES' graphic primitives.</description>
    </item>
    <item rdf:about="https://retroprogramming.iwashere.eu/mt6502:walking?rev=1606859883&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-12-01T22:58:03+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mt6502:walking</title>
        <link>https://retroprogramming.iwashere.eu/mt6502:walking?rev=1606859883&amp;do=diff</link>
        <description>Multithreading on 6502/6510 retrocomputers

ANIMATIONS USING PROTOTHREADS

The code on |tutorial_protothread2.c shows how to make an animation with several autonomous actors, each managed by a separate thread.

We will not comment on every single line but will limit ourselves to pointing out some fundamental points, to be explored. In particular, this tutorial uses the tiles and the rendering engine created for</description>
    </item>
</rdf:RDF>
