My solution
88+g1v2v2*5*+2*5*+P$0724c1014c1084c1084c1114c0444c0324c0874c1114c1144c1084c1004c!
uses a subroutine starting at position 4 expecting
1
2
3
on the stack, transforming it to
3
2
1
changing it to decimal number
123
print via P and returning to caller.
The program starts with a jump over the subroutine to the sequence printing the characters.
The first character, H, is printed this way:
0 \
7 } ASCII representation of H
2 /
4 \_ subroutine call
c /
Is there a way to make it shorter?
Mon Jun 15, 2009 8:39 am View user's profile Send private message
Hello World
Re: Hello World
You can simply omit the trailing `!' which is not required at a program end. Moreover, you could think about avoiding the reversal of your coding or using a loop instead of linear sub routine calls. However, you will surely find some more improvements while solving the following HVM challenges.A.Polke wrote:Is there a way to make it shorter?
I'll not post my code this time... it was my first HVM program ever and, as of today, I'm not proud of it.
I was simply calculating numbers and printing the corresponding ASCII... like probably most others did. Your solution is very creative!
But don't expect shorter examples here... there is (at least) one similar challenge (It's a Small World) which exactly asks to do it shorter.
Stay tuned for more HVM challenges, you're well prepared!

But don't expect shorter examples here... there is (at least) one similar challenge (It's a Small World) which exactly asks to do it shorter.
Stay tuned for more HVM challenges, you're well prepared!