//helloebc.html Copyright (C) 1989-2017 I.Pedley (CTPP) Thu 23/03/17 at 21:32:26

//first EBC  program to work unchanged on both x86 and IA64 Shell

asm
{
        MOVnw   r1,@r0(+1,+16)
        MOVnw   r1,@r1(+5,+24)
        STORESP r2,[IP]         //r2 is instruction pointer after STORESP
        MOVIdd  r3,$banner      //$ generates a relative offset to banner
        ADD64   r2,r3           //r2 is now run-time address of UI banner[]

        PUSHn   r2
        PUSHn   r1
        MOVnw   r3,@r1(+1,+0)
        CALLEX  r3
        POPn    r1
        POPn    r2
        ret
}

    UI banner[6]={'C','h','a','O','S','!'};