This comes from the Geoworks Developer Relations "White Papers" web site:
-------------------------------
BP and Local Variables
When a procedure takes parameteres in BP and uses local
variables, BP can be saved before the stack frame is allocated.
Saving BP in a local variable
BP can be saved into the first push-initialized variable.
; ^hbp = GState to draw to
CircleVisDraw method dynamic CircleClass, MSG_VIS_DRAW
gStateHandle local hptr.GState push bp
count local word
.enter
......
mov di, ss:[gStateHandle]
call GrDrawPoint
Saving BP in another register
; ^hbp = GState to draw to
CircleVisDraw method dynamic CircleClass, MSG_VIS_DRAW
count local word
mov di, bp ; ^hdi = GState
.enter
......
call GrDrawPoint
-------------------------------
Hope this helps.
Nathan