--- title: "Speed_bas" type: "article" slug: "speed_bas" url: "http://localhost/article/speed_bas/" markdown_url: "http://localhost/article/speed_bas.md" published_at: "2026-11-11T11:07:27+00:00" modified_at: "2026-11-11T11:07:27+00:00" featured_image: url: "http://localhost/wp-content/uploads/2022/04/20230809-041332.jpg" excerpt: "SPEED_BAS, a short SuperBASIC test showing why a QL with memory expansion runs programs faster: it POKEs a small machine-code delay loop first into memory reserved with RESPR and then into the bottom 128K, and times both. The article explains that the ZX8301 ULA, which continually scans the 32K of video memory for the display, has priority over the 68008 on the internal 128K. The listing credits Personal Computer as its source, modified by RG for QL_DOC." post_tag: - name: "French language" slug: "french-language" taxonomy: "post_tag" url: "http://localhost/tag/french-language/" - name: "QL" slug: "ql" taxonomy: "post_tag" url: "http://localhost/tag/ql/" - name: "RAM" slug: "ram" taxonomy: "post_tag" url: "http://localhost/tag/ram/" - name: "Superbasic (programming language)" slug: "superbasic-programming-language" taxonomy: "post_tag" url: "http://localhost/tag/superbasic-programming-language/" - name: "Type-in program" slug: "type-in-program" taxonomy: "post_tag" url: "http://localhost/tag/type-in-program/" model: - name: "Sinclair QL" slug: "sinclair-ql" taxonomy: "model" url: "http://localhost/model/sinclair-ql/" indiv: - name: "Real Gagnon" slug: "real-gagnon" taxonomy: "indiv" url: "http://localhost/indiv/real-gagnon/" publication: "QL_DOC" publication_r: id: 52925 title: "QL_DOC" type: "periodical" url: "http://localhost/periodical/ql_doc/" authors: "Réal Gagnon" issue: "5" issues_articles: - id: 76714 title: "QL_DOC n5" type: "issue" url: "http://localhost/issue/ql_doc-n5/" pages: "11" pubdate: "August-September 1988" archive_link: false volumeissue: "n5" --- # Speed_bas **In English:** SPEED_BAS, a short SuperBASIC test showing why a QL with memory expansion runs programs faster: it POKEs a small machine-code delay loop first into memory reserved with RESPR and then into the bottom 128K, and times both. The article explains that the ZX8301 ULA, which continually scans the 32K of video memory for the display, has priority over the 68008 on the internal 128K. The listing credits Personal Computer as its source, modified by RG for QL_DOC. *The article below is in French, as printed in QL_DOC n5 (August-September 1988).* *** Un entend souvent dire qu’une expansion de mémoire accélère le fonctionnement des programmes, par exemple QUILL est plus rapide dur un QL avec 640K que sur un autre avec 128K seulement. Le programme suivant sert à démontrer ceci en logeant un petit programme machine dans la mémoire haute dans un premier temps, après la même opération s’exécute mais en mémoire basse (mémoire vidéo) et on constate la plus différence dans le temps d’exécution. Bien entendu si vous avez un QL avec 128K il n’y aura pas de différence entre les 2 temps. Le premier test avec un expansion de mémoire devrait donner 22 secondes tandis que le deuxième donne 33-32 secondes, donc une différence de 10 secondes! La raison est fort simple. La mémoire jusqu’à 128K est incluse à l’intérieur du QL, l’on sait que sur 128K il y a 32K réservé à la mémoire-vidéo. Cette mémoire est continuellement “SCANNé” par l’ULA ZX8301 pour la génération de l’image sur notre écran, si le ZX8301 lit notre mémoire le 68008 ne peut le faire car la mémoire ne peut être lue que par un seul à la fois et le ZX8301 à la priorité. ``` 100 REMark SPEED TEST 110 REMark source Personal Computer 120 REMark mod. RG-o QL_DOC 88 130 : 140 CLS 150 ram=RESPR(16):RESTORE 300 160 test 1 170 LET ram=2^17:RESTORE 300 180 test 2 190 : 200 DEFine PROCedure test(numero) 210 FOR p=ram TO ram+14 STEP 2 220 READ x:POKE_W p,x 230 END FOR p 240 PRINT "Début du test"!numero"Adresse de la routine"!ram 250 t=DATE:CALL ram 260 PRINT "Test terminé... Temps écoulé: ";DATE-t;" secondes"\ 270 PRINT 280 END DEFine 290 : 300 DATA 28771,29439,20937,-2,20936,-8,28672,20085 ```