Ooops
September 27, 2020, 05:21:08 PM

Author Topic: Print ascii characters (Amstrad CPC)...  (Read 2038 times)

Offline Dabz

  • Sr. Member
  • ****
  • Posts: 261
  • Is it cos I is ginger?
    • dabzy.co.uk
Print ascii characters (Amstrad CPC)...
« on: June 20, 2017, 12:25:30 AM »
... The long way! :D

Code: [Select]
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

Offline EdzUp

  • Jr. Member
  • **
  • Posts: 88
    • EdzUp
Re: Print ascii characters (Amstrad CPC)...
« Reply #1 on: June 20, 2017, 07:38:01 AM »
I admit I'm a bit rusty here but isn't SYMBOL command the shorter version?

Offline therevills

  • Hero Member
  • *****
  • Posts: 611
Re: Print ascii characters (Amstrad CPC)...
« Reply #2 on: June 20, 2017, 10:38:48 AM »
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!

Offline Dabz

  • Sr. Member
  • ****
  • Posts: 261
  • Is it cos I is ginger?
    • dabzy.co.uk
Re: Print ascii characters (Amstrad CPC)...
« Reply #3 on: June 21, 2017, 01:27:47 PM »
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...


Code: [Select]
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

Online Steve Elliott

  • Hero Member
  • *****
  • Posts: 2780
  • elgol 2021
Re: Print ascii characters (Amstrad CPC)...
« Reply #4 on: June 21, 2017, 03:40:36 PM »
Assembly, cool.   :D
Windows 10, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb)
MacOS Catalina, 64-bit, 8Gb RAM, CPU Intel i5, 2.3 Ghz, Intel Iris Plus Graphics 640 1536 MB
Linux Mint 19.3, 64-bit, 16Gb RAM, CPU Intel i5, 3.2 GHz, Nvidia GeForce GTX 1050 (2Gb)
Raspberry Pi Zero and pi 4

 

SimplePortal 2.3.6 © 2008-2014, SimplePortal