3 ms·
If you wrote the same thing in assembly language and, by convention, you return the value from a subroutine in the AX register. This function is not returning a
by mianos 5y ago
If you wrote the same thing in assembly language and, by convention, you return the value from a subroutine in the AX register. This function is not returning anything useful so you don't 'MOV AX,blah', yet your caller expected something in it, is it undefined?
Does the AX register exist in the caller? Yes.
Does it have a value? Yes.
Is its 'value' undefined. Yes.
Is there any undefined 'behaviour' of anything you told it to do? Not to me. Subtle maybe.
- GoblinSlayer 5y agoI mean what the C standard says about it.