Coding Compendium
A free 100-page ebook collecting my projects and tutorials for Raspberry Pi, micro:bit, Scratch and Python. Simply join my newsletter to download it.
See how to export Amstrad BASIC program code from an emulator as a text file so you can share it as a listing, or post it online. I'll also show you how to paste code into the Winape emulator.
Using an emulator, you're working in a strange machine within a machine, and aside from loading discs it's not obvious how to move data between the emulated machine and the host computer that is running the emulator. Sometimes, you might want to get your BASIC programs out of the emulator in a form you can use on your Windows computer. Other times, you might see code snippets on a web page that you want to input into the emulator.
Although there is no obvious copy and paste between the Amstrad emulator and your Windows host machine, Winape does provide methods to move BASIC code between the emulator and the host machine.
When you're using the Winape Amstrad CPC emulator, there might be times when you want to export your BASIC program as a text file so you can post it online, or contribute it to a magazine (of which there are several at the moment).
To do that, follow these steps:
LIST #8
The # character is [SHIFT]+3.
Winape also provides a feature you can use to paste in BASIC program code and instructions. It's called Auto Type, and it's handy if you see BASIC programs in forums online that you want to try in your emulator.
With the ability to export and import text files in Amstrad BASIC, you can also use sophisticated text processing tools on your program in Windows, such as search and replace for variable names using Notepad. Your program can still be saved in an Amstrad-native format, ready to run, when you've finished editing.
Find all my Amstrad CPC tutorials here, and download my updated software disc here!
© Sean McManus. All rights reserved.
Visit www.sean.co.uk for free chapters from Sean's coding books (including Mission Python, Scratch Programming in Easy Steps and Coder Academy) and more!
A free 100-page ebook collecting my projects and tutorials for Raspberry Pi, micro:bit, Scratch and Python. Simply join my newsletter to download it.
Web Design in Easy Steps, now in its 7th Edition, shows you how to make effective websites that work on any device.
Power up your Microsoft Excel skills with this powerful pocket-sized book of tips that will save you time and help you learn more from your spreadsheets.
This book, now fully updated for Scratch 3, will take you from the basics of the Scratch language into the depths of its more advanced features. A great way to start programming.
Code a space adventure game in this Python programming book published by No Starch Press.
Discover how to make 3D games, create mazes, build a drum machine, make a game with cartoon animals and more!