--- title: "Dragon Slayer" id: 72965 type: "computer_media" slug: "dragon-slayer" url: "http://localhost/computer_media/dragon-slayer/" markdown_url: "http://localhost/computer_media/dragon-slayer.md" published_at: "2026-10-27T21:30:07+00:00" modified_at: "2026-10-27T21:30:07+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/10/slayer-1.png" excerpt: "A knight with a bow must reach the castle and shoot the dragon before its fiery breath or a bump costs him his four lives." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "QL" slug: "ql" taxonomy: "post_tag" url: "http://localhost/tag/ql/" model: - name: "Sinclair QL" slug: "sinclair-ql" taxonomy: "model" url: "http://localhost/model/sinclair-ql/" indiv: - name: "Richard Snowden" slug: "richard-snowden" taxonomy: "indiv" url: "http://localhost/indiv/richard-snowden/" genre: - name: "Game" slug: "game" taxonomy: "genre" url: "http://localhost/type/game/" media_type: "Diskette" programmers: - name: "Richard Snowden" slug: "richard-snowden" taxonomy: "indiv" url: "http://localhost/indiv/richard-snowden/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Dragon%20Slayer%20%28198x%29%28Snowden%2C%20Richard%29%28Sinclair%20QL%29%28UK%29%28Program%29.zip" mediadate: "198x" images: - url: "http://localhost/wp-content/uploads/2026/10/slayer-1.png" - url: "http://localhost/wp-content/uploads/2026/10/slayer-2.png" media_type_tags: "Game" license: false --- # Dragon Slayer Dragon Slayer is a graphical action game. Your knight starts beside a lake and must cross to the castle, collect arrows at its door and shoot the dragon flying overhead, while the dragon swoops and breathes fire. The status line shows arrows, lives (four to start) and dragons slain; when the game ends it announces whether the knight or the dragon won and offers another game. The REMs credit Richard Snowden, say it was printed in *PC Weekly*, and note that it was typed in by Clem Taylor. ## Program Analysis `MOVESET` copies the character set to new memory and `READCHARS` redefines characters for the knight, dragon, arrows and castle; `CASTLE` and `LAKE` draw the scene, and `PLAY` runs the game loop, reading the keyboard with `KEYROW`. ### Potential Issues - `MOVESET` reads the character-set pointer at the fixed address 167722. That works on a Minerva ROM, but on the JS ROM in QLRun the program stops with “bad parameter” at line 1380. It came from a QL owner’s floppy copies of QUANTA and IQLUG library material, imaged double-stepped so that only half of each disk survived; this file read back complete. The download holds the files exactly as recovered and a QL5A floppy image, *Dragon Slayer.img*, with the same files and their QDOS headers. Mount the image as FLP1_ (drop it on the QLRun page, or use it as a floppy image in sQLux, QPC2 or Q-emuLator) and type `lrun flp1_slayer_bas`. Tested in QLRun: it runs with the Minerva ROM (shown in the screenshots); with the JS ROM it stops at line 1380. ## Source Code ``` 10 REMark Dragon Slayer 20 REMark BY Richard Snowden 25 REMark printed in PC Weekly 26 REMark typed by clem taylor 30 REMark 120 MOVESET 130 READCHARS 140 CASTLE 280,166 150 DOOR 280,166,5 160 LAKE 170 INIT 180 PLAY 190 STOP 200 DEFine PROCedure CASTLE(X,Y) 210 WINDOW #1,465,210,32,2:WINDOW #0,465,46,32,210:BEEP 220 FOR I=0 TO 2:BORDER #I,0,0:SCALE #I,256,0,0:INK #I,7:PAPER #I,0:CLS #I:OVER #I,0 230 MODE 8 240 LINE X,Y:INK 2:FILL 1:LINE_R 50,0 TO 0,40 TO -50,0 TO 0,-40 250 INK 2,3:FILL 1:LINE_R 0,40 TO 10,5 TO 50,0 TO -10,-5 260 INK 2,0:FILL 1:LINE_R TO 10,5 TO 0,-40 TO -10,-5 TO 0,40 270 INK 0:FILL 1:LINE X,Y 280 LINE_R 3,10 TO 0,20 TO 3,5 TO 3,-5 TO 0,-20 TO -6,0 290 FILL 1:LINE X+38,Y:LINE_R 3,10 TO 0,20 300 INK 3:FILL 1:LINE X,Y:LINE_R 0,40 TO 5,10 TO 5,-10 TO -10,0 310 INK 3,0:FILL 1:LINE_R 5,10 TO 10,5 TO 5,-10 TO -10,-5 TO -5,10 320 INK 3:FILL 1:LINE X+38,Y:LINE_R 0,40 TO 5,10 TO 5,-10 TO -10,0 330 INK 3,0:FILL 1:LINE_R 5,10 TO 10,5 TO 5,-10 TO -10,-5 TO -5,10 340 FILL 0:OVER -1:CSIZE 3,1:CSIZE #0,0,1:OVER #0,1 350 FOR I= 10 TO 0 STEP -2:INK #0,1+6*(I=0):CURSOR #0,I, (10-I) :PRINT #0,"QL Dragon Slayer" 360 OVER #0,0:END DEFine 370 DEFine PROCedure DOOR(X,Y,COLOUR) 380 LINE X+25,Y:OVER 0:INK COLOUR:FILL 1 390 LINE_R -10,0 TO 0,30 TO 10,5 TO 10,-5 TO 0,-30 TO -10,0:OVER -1 400 END DEFine 410 DEFine PROCedure INIT 420 X=20:Y=150:DIRN=33:FX=330:FY=50:LIVES=4:DRAS=-1 430 DX=270:DY=80:PO=37:FIRE=0:ARR=6:INC=0 440 END DEFine 450 DEFine PROCedure PLAY 460 KNIGHT X,Y:DRA DX,DY,PO:ARROW FX,FY:ARROWSLEFT:LIVESLEFT:DRASLEFT 470 REPeat LOOP 480 K1=KEYROW(1) 490 IF K1&&2 : IF X>8 THEN KNIGHT X,Y :X=X-8:DIRN=35:KNIGHT X,Y 500 IF K1&&16 : IF X<420 THEN KNIGHT X,Y:X=X+8:DIRN=33:KNIGHT X,Y 510 IF K1&&4 : IF Y>8 THEN KNIGHT X,Y :Y=Y-8 :KNIGHT X,Y 520 IF K1&&128: IF Y<180 THEN KNIGHT X,Y:Y=Y+8 :KNIGHT X,Y 530 IF KEYROW(7)&&4:IF ARR>0:IF NOT FIRE THEN FIRE=1:FX=X:FY=Y:FP=10*(DIRN=33)-10*(DIRN=35):INC=DIRN=33:ARR=ARR-1:ARROWSLEFT:ARROW FX,FY:BEEP 0,10,-2,100,-2,100 540 IF FIRE:IF FX<10 OR FX>420 THEN FIRE=0:ARROW FX,FY:FX=330:FY=50:BEEP:ELSE ARROW FX,FY:FX=FX+FP:ARROW FX,FY 550 IF FXDX:IF FY>DY -10:IF FY326 AND X<334: IF Y>40 THEN DOOR 80,166,0 570 IF ARR=0:IF Y<72 : IF Y>60:IF X>326 AND X<334 THEN ARR=6:KNIGHT X,Y:X=20:Y=150:DOOR 280,166,5:KNIGHT X,Y:ARROWSLEFT:FOR S=255 TO 10 STEP -1:BEEP 1600,S,-255,500,-255,500 580 R=DOT(X,Y) 590 IF R THEN BUMP X,Y,1:LIVESLEFT 600 IF FIRE>Y-10:IF DYX THEN PO=37:DX=DX-8 650 IF DXY :IF DY>18 THEN DY=DY-8:IF DOT (DX+(PO=42)*40,DY) THEN DY=80 670 IF DX20:IF BY<72:IF BX<320:IF PO<>37 THEN W=300-P:W=W*(P<290) 830 BLOCK W,40,P,BY-10,2,0 840 IF X>P:IF XBY-30:IF Y