Home > Books > Amstrad CPC > Export BASIC code as text

How to copy and paste BASIC programs between the Winape Amstrad emulator and your Windows host machine

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.

Amstrad CPC keyboard, showing bright green keys, and the Amstrad logo in silverUsing 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.

How to turn a BASIC program in an Amstrad emulator into a text file

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:

  1. In Winape, open the Settings menu.
  2. Choose Other.
  3. In the printer settings, set the option to print to a File. Enter the filename you'd like to use.

    screengrab of the Winape printer settings

  4. Click OK
  5. At the BASIC Ready prompt, enter: LIST #8 The # character is [SHIFT]+3.
  6. Your program listing will now be written to your chosen text file.
  7. If you enter the LIST #8 command again without changing the filename in the printer settings, your new listing will be added to the end of the previous one. Anything sent to the printer (#8) is added to the end of the text file.
  8. How to use Auto Text to paste BASIC programs into the Winape Amstrad CPC emulator

    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.

    1. From the file menu, choose Auto Type. You can also use the shortcut Ctrl+F5.
    2. Use the Load button to load a text file.
    3. screengrab of the Winape Auto Type settings

    4. Alternatively, you can paste or type your instructions into the window.
    5. Click OK.
    6. The emulator will now automatically type the text from the Auto Type window into the emulator. This may take some time, depending on the length of the listing.

    More Amstrad CPC tutorials and software

    Find all my Amstrad CPC tutorials here, and download my updated software disc here!

Credits

© 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!

Discover my latest books

Coding Compendium

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.

Web Design in Easy Steps

Web Design IES

Web Design in Easy Steps, now in its 7th Edition, shows you how to make effective websites that work on any device.

100 Top Tips: Microsoft Excel

100 Top Tips: Microsoft Excel

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.

Scratch Programming in Easy Steps

Scratch Programming IES

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.

Mission Python book

Mission Python

Code a space adventure game in this Python programming book published by No Starch Press.

Cool Scratch Projects in Easy Steps book

Cool Scratch Projects in Easy Steps

Discover how to make 3D games, create mazes, build a drum machine, make a game with cartoon animals and more!

Walking astronaut from Mission Python book Top | Search | Help | Privacy | Access Keys | Contact me
Home | Newsletter | Blog | Copywriting Services | Books | Free book chapters | Articles | Music | Photos | Games | Shop | About