Print ascii characters (Amstrad CPC)...

Started by Dabz, June 20, 2017, 00:25:30

Previous topic - Next topic

Dabz

... The long way! :D

10 iMachCodeAmount = 11
20 FOR iLoopMachCode = 0 to iMachCodeAmount – 1
30 READ iMachCodeByte
40 POKE (&4000+iLoopMachCode),iMachCodeByte
50 NEXT
60 PRINT "Machine code in memory."
70 END
80 DATA &3E, &20, &CD, &5A, &BB, &3C, &FE, &FF, &38, &F8, &C9
CALL &4000


:D
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 16Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit

EdzUp

I admit I'm a bit rusty here but isn't SYMBOL command the shorter version?

therevills

Quote from: EdzUp on June 20, 2017, 07:38:01
I admit I'm a bit rusty here but isn't SYMBOL command the shorter version?

I created all my game "graphics" on the Amstrad using the SYMBOL command!

Dabz

No, its not the symbol command, basically, the machine code in the data statements does exactly what all of us old amstrad'ers have typed out at least once...



For n=32 to 255
Print chr$(n)
Next


This is how I used to tinker with the z80 back in the day before I got hold of a decent assembler, notes and notes of notes on opcodes when I figured out what they did! :D

I miss them days!

Dabz
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 16Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit

Steve Elliott

Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb