First off, do you mind starting on a simpler program? Believe it or not (you probably should
), it is rather difficult to do this in ASM. You don't get handed the simple "{Pi}R²->X", you have to implement floating point numbers yourself. Perhaps, an easier program would be "Count from 1 to 100, displaying all the numbers", or rather, a better first program. I think there was a thread about beginner's ASM program challenges, but some of those are more advanced than the level you are at
Now, your code. Firstly, make sure everything is tabbed out correctly. If you were to try to compile it (besides the obvious blank "ld" line), you would get an error about "ld A, 0" and "ret" not being valid labels (or something of that nature). You need to _always_ tab your instructions out, and your labels need to be touching the far left side. Next, .db stands for "data byte", which basically means to the compiler: leave an extra byte here, oh and while you're at it, set the value to X. Bytes are integers in ASM (ie, no decimal parts), and they are limited to being within 0 and 255. So, you can't have ".db 3.1415<...>" because that's not an integer.
Also, it would seem that you are trying to multiply A by (pi) and store it in HL, which, first of all, is not the right way to do that. If you want, I can post how to do that, but just know that (ADDRESS) is called "indirection" and is a way to load values from memory locations. Math doesn't work the same way in ASM as it does in Basic. In Basic, you have something called "infix notation", which is like "3*(4+2)" (Which, we all know, is 24). But, in ASM, to express the same thing, you have to first change it into the correct order of operations, so "4+2*3". Otherwise, it will just run straight through it and will return "(3*4)+2". FWIW, here is how you would write that in ASM:
Code: ld a,4 ; Store 4 in the register A
add a,2 ; Add 2 to A
ld b,a ; Back A up into B (So that we can add it later)
add a,a ; A+A->A
add a,b ; A + (4+2)->A
Or, annotated as its Basic counterpart:Code: ld a,4 ; 4->A
add a,2 ; A+2->A
ld b,a ; A->B
add a,a ; A+A->A
add a,b ; A+B->A
Does that make sense?