Administrator
|
Most people implement the pointer segment like the other fixed-base segments, so their code works for
push/pop pointer n
where n is any integer.
You are taking an approach that requires that you treat push/pop pointer 0 differently than push/pop pointer 1 and that you can't handle anything other than 0 or 1. There's nothing intrinsically wrong with either approach.
The "other people's" code you show look like the code for "pop that 0"
|