File:Locomotive BASIC color bars.gif
From Wikimedia Commons
Jump to navigation
Jump to search
Size of this preview: 800 × 557 pixels. Other resolutions: 320 × 223 pixels | 640 × 446 pixels | 841 × 586 pixels.
Original file (841 × 586 pixels, file size: 58 KB, MIME type: image/gif, looped, 128 frames, 11 s)
File information
Structured data
Captions
Summary
[edit]DescriptionLocomotive BASIC color bars.gif |
English: An Amstrad CPC emulated in MAME running a short Locomotive BASIC demo program which displays color bars similar to SMPTE color bars or EBU colour bars. |
Date | |
Source | Own work |
Author | Morn |
Locomotive BASIC program
[edit]10 mode 0
20 ink 1,26:ink 2,24:ink 3,20:ink 4,18
30 ink 5,8:ink 6,6:ink 7,2:ink 8,0
40 for i=1 to 8
50 paper i
60 print space$(40);
70 next
Program notes
[edit]- Key words are printed in uppercase when the program is output with "list". But entering code is usually done in lowercase.
- line 10: screen mode 0 is used (16 colours; 20x25 characters)
- lines 20/30: set up colour palette; note that multiple instructions can be combined on a line
- lines 40 to 70: a "for" loop over i
- line 50: set the paper (background) colour to i
- line 60: print 40 spaces (= 2 lines); space$ is a built-in function that returns a string
- When the program ends, the "Ready" prompt is white-on-black because the current foreground (pen) colour, which is 1, had been set to white ("ink 1,26"). The background colour is 8 after the loop and "ink 8,0" had set that to black previously. See File:Amstrad CPC ink numbers.png for a chart of Amstrad ink numbers.
Licensing
[edit]I, the copyright holder of this work, hereby publish it under the following license:
This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication. | |
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse |
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 20:15, 24 December 2023 | 841 × 586 (58 KB) | Morn (talk | contribs) | Uploaded own work with UploadWizard |
You cannot overwrite this file.
File usage
There are no pages that use this file.
Global file usage
The following other wikis use this file:
- Usage on ar.wikipedia.org
- Usage on en.wikipedia.org
Structured data
Items portrayed in this file
depicts English
Locomotive BASIC English
copyright license English
Creative Commons CC0 License English
source of file English
original creation by uploader English
inception English
24 December 2023
media type English
image/gif
Hidden categories: