; Listing1-6.asm
;
; A program that demonstrates version 2 of
; the _push and _pop macros.

            option     casemap:none
            include    ctPushPop.inc

            
            .const

; Program title:

            align   word
ttlStr      byte    "Listing 1-6", 0


            .code

        
; Here is the main assembly language function.

            
            public  asmMain
asmMain     proc

; Create a fake display here:
            
            push    rbp
            mov     rbp, rsp
            sub     rsp, 56
            push    rbx

ifStk       =       0
            _push(ifStk, <Hello >)
            _push(ifStk, <World >)
       
tos         _pop(ifStk)     
%           echo After 1st pop, item popped is <<&tos>>

nos         _pop(ifStk)     
%           echo After 2nd pop, item popped is <<&nos>>
            
            

allDone:    pop     rbx
            leave
            ret     ;Returns to caller
        
asmMain     endp
            end