--- title: "Snake" id: 72959 type: "computer_media" slug: "snake-2" url: "http://localhost/computer_media/snake-2/" markdown_url: "http://localhost/computer_media/snake-2.md" published_at: "2026-10-27T21:30:11+00:00" modified_at: "2026-10-27T21:30:11+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/10/snake-1.png" excerpt: "Guide a growing snake around a walled arena, eating apples and numbered targets at one of three speeds, with a machine-code core loaded by a short BASIC front end." 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: "I. Jordan" slug: "i-jordan" taxonomy: "indiv" url: "http://localhost/indiv/i-jordan/" genre: - name: "Arcade" slug: "arcade" taxonomy: "genre" url: "http://localhost/type/arcade/" media_type: "Diskette" programmers: - name: "I. Jordan" slug: "i-jordan" taxonomy: "indiv" url: "http://localhost/indiv/i-jordan/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Snake%20%281985%29%28Jordan%2C%20I.%29%28Sinclair%20QL%29%28UK%29%28Program%29.zip" mediadate: "1985" images: - url: "http://localhost/wp-content/uploads/2026/10/snake-1.png" - url: "http://localhost/wp-content/uploads/2026/10/snake-2.png" media_type_tags: "Arcade" license: false --- # Snake Snake is the classic arcade game: steer a snake around a red-walled arena, eat the apples and numbered blocks for points, and avoid the walls and your own tail. A title screen offers three levels, Easy, Reasonable and Impossible, chosen with F1 to F3; the game keeps a high score and shows the score and screen number along the top. The title screen reads “Snake By I Jordan”, and the REMs date it August 1985. The game itself is machine code; the end line of the playfield signs it “Snake by I.K.J”. ## Program Analysis `snake_bas` opens a full-screen window, prints the title, reserves 2,900 bytes with `RESPR`, loads `snake_code` into them with `LBYTES`, then reads the level from a function key (the codes 232, 236 and 240 for F1 to F3) and pokes the speed into the code at `a+329` before calling it. ### Potential Issues - The loader expects the code on `mdv2_`; the floppy-image copy reads `flp1_`. 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, *Snake.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_snake_bas`. In the image copies only, `mdv2_snake_code` reads `flp1_snake_code` so the program finds its files on the floppy. Tested in QLRun with the JS ROM: the title screen, the level choice and a game in progress. ## Source Code ``` 100 REMark Snake by I Jordan 110 REMark August 1985 120 MODE 4 130 OPEN #3,scr_512x256a0x0 140 PAPER #3,0:INK #3,4:CSIZE #3,2,1 150 CLS #3 160 AT #3,1,19:PRINT #3,"Snake" 170 AT #3,3,20:PRINT #3,"By" 180 AT #3,5,17:PRINT #3,"I Jordan" 190 a=RESPR(2900) 200 LBYTES mdv2_snake_code,a 210 CSIZE #3,0,0:INK #3,7 220 AT #3,14,30:PRINT #3,"Which level do you want?" 230 AT #3,16,32:PRINT #3,"(1) Easy" 240 AT #3,18,32:PRINT #3,"(2) Reasonable" 250 AT #3,20,32:PRINT #3,"(3) Impossible" 260 INK #3,4 270 AT #3,22,16:PRINT #3,"Press the function key corresponding to your choice" 280 REPeat get_level 290 level=CODE (INKEY$(-1))-232 300 IF level<12 AND level>-1 THEN EXIT get_level 310 END REPeat get_level 320 level=level DIV 3 330 POKE a+329,(48-level*4) 340 PAPER #3,2:CLS #3 350 CALL a 360 CLOSE #3 370 NEW ```