; Listing1-3.asm
;
; A program that demonstrates the (new) ip macro that
; provides a data declaration for ip addresses using
; the ip_adrs structure.

            option     casemap:none
            include    aoalib.inc   ;AoA library + constants
            includelib aoalib.lib   ;Link in aoalib library

            include    ip.inc       ;ip macro declaration
            
            .const

; Program title:

            align   word
ttlStr      byte    "Listing 1-3", 0


            .data
                        
; Demonstrate the use of the ip macro to create some IP addresses:

TwoAdrses   ip      (123.222.122.023:258, 111.222.000.121:555)
szTA        textequ %size TwoAdrses
%           echo    size TwoAdrses=szTA

szofTA      textequ %sizeof TwoAdrses
%           echo    sizeof TwoAdrses=szofTA

lenTA       textequ %length TwoAdrses
%           echo    length TwoAdrses=lenTA

lenofTA     textequ %lengthof TwoAdrses
%           echo    lengthof TwoAdrses=lenofTA


LocalAdrs   ip      (192.168.2.80:20560)
Watchdog    ip      (192.168.2.19:20651)
GitLab      ip      (10.0.1.41:8080)

myIP        ip_adrs {01020304h, 0102h} 
            .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

            
            

allDone:    pop     rbx
            leave
            ret     ;Returns to caller
        
asmMain     endp
            end