Created
December 31, 2016 09:46
-
-
Save thinkyhead/969b8cdcad17c56debd35fa571c161dd to your computer and use it in GitHub Desktop.
Atari Emulator Send File to Host
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.AtariBASIC | |
. | |
. Export a file on D: to the host OS by sending it to P: | |
. Works with Atari800MacX and other Atari 8-bit Computer emulators | |
. | |
10 DIM F$(14),N$(12),C$(1),E$(1) | |
20 C$=CHR$(125):E$=CHR$(155) | |
30 ? C$;"< ATARI FILE EXPORT >" | |
40 ? "USES P: TO SEND FILES" | |
50 ? "TO THE HOST SYSTEM." | |
60 TRAP 70 | |
70 ? E$;"FILE ";:INPUT N$ | |
75 IF N$="" THEN END | |
80 F$="D:":F$(3)=N$ | |
90 TRAP 150:CLOSE #1 | |
100 OPEN #1,4,0,F$:OPEN #2,8,0,"P:" | |
110 ? "Sending ";N$;" to host..."; | |
115 TRAP 130 | |
120 GET #1,C:PUT #2,C:GOTO 120 | |
130 CLOSE #1:CLOSE #2 | |
140 ? "DONE":GOTO 60 | |
150 ? "CAN'T OPEN":GOTO 60 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment