CPCWiki forum

General Category => General Discussion - Introductions => Topic started by: eisbaer on 11:25, 16 September 20

Title: Hello world!
Post by: eisbaer on 11:25, 16 September 20

Hi everybody, new member here joining the CPCWiki community!


Started with an Amstrad CPC 6128 in 1986, and still continue using it almost everyday of my life.


I've been following this forum from a long time ago, and I think is now time for registering and start contributing to this amazing community.


Best regards from Spain


eisbaer
Title: Re: Hello world!
Post by: Ast on 12:04, 16 September 20

Hello & Welcome !




       org #A000


       ld hl,hello
loop ld a,(hl)
       ret z
       call #bb5a
       inc hl
       jr loop
hello byte "Hello World!",0

Title: Re: Hello world!
Post by: Gryzor on 12:06, 16 September 20
Welcome mate! Glad you've enjoyed our community, hope you stay :)

@Ast (https://www.cpcwiki.eu/forum/index.php?action=profile;u=573) : show-off :p
Title: Re: Hello world!
Post by: Ast on 12:08, 16 September 20
@Gryzor (https://www.cpcwiki.eu/forum/index.php?action=profile;u=1) Hello world! is Hello world!  :P



Title: Re: Hello world!
Post by: Gryzor on 12:11, 16 September 20
Heheh yeah indeed :)
Title: Re: Hello world!
Post by: mr_lou on 13:32, 16 September 20
Welcome here!  :)
Title: Re: Hello world!
Post by: Urusergi on 20:44, 16 September 20
Hi eisbaer!
I prefer this version of the printing routine. It's slightly faster  8)



       org #A000


       ld hl,hello
loop   ld a,(hl)
       inc hl       ;(inc l)
       and a
       call nz,#bb5a
       jr nz,loop
       ret
hello  byte "Hola eisbaer, bienvenido!",0

Title: Re: Hello world!
Post by: eisbaer on 21:27, 16 September 20


btw



#include <stdio.h>
main()
{
  printf("Thanks for the warm welcome!");
}



and then running z88dk with "zcc +cpc -lndos -o hello.bin hello.c"...


Probably will take some additional CPU cycles when running on the CPC, but should do the trick as well  ;D
Powered by SMFPacks Menu Editor Mod