home *** CD-ROM | disk | FTP | other *** search
File List | 1990-11-13 | 15.7 KB | 300 lines |
-
-
- HI-TECH SOFTWARE Z80 Macro Assembler: rzsw.as
- Page 1
-
-
- 1 0000' psect data
- 2 global _node_addr, _l2_user_info, _l2_info, Copyright
- 3 global _L3CALL,_L3DIGI, _L3PORT, _L3_MAXVC, _L3_WI, _L3DELAY
- 4 global _L3CSIZ, _L3NSIZ, _NPAroute, _userport
- 5 global _l2parms, _dl2parms, _l3parms, _dl3parms
- 6 global _USER_MAXVC, _USER_L3_W, _RTable
- 7 global _sumchk, __Lbssck, mycall, mydigi, myaddr
- 8 global _NULLFCN, _clr_boot, _con_boot, _recv_boot
- 9 global _rst_boot, _send_boot, _loader
- 10 global _complete, _being_set
- 11 global _Entry, _entry
- 12 global _passlen, _passwd
- 13
- 14 0000' initdta:
- 15 0000' 0A 31 00 00 myaddr: defb 10,31h,00h,00h,00h,00h,00h ;node address
- 0004' 00 00 00
- 16 0007' 0029' defw _l2_info ;dummies message
- 17 0009' 0105' defw l2parms ;l2 user config
- 18 000B' 0111' defw l3parms ;l3 link config
- 19 000D' 0004 defw 4 ;L3 user pkt window
- 20 000F' 0005 defw 5 ;L3 user max vc cnt
- 21 0011' 000F defw 15 ;_L3CSIZ, no L3 users
- 22 0013 = initlen equ $-initdta
- 23
- 24 0013' 43 6F 70 79 Copyright: defm 'Copyright 1988-90 W2VY'
- 0017' 72 69 67 68
- 001B' 74 20 31 39
- 001F' 38 38 2D 39
- 0023' 30 20 57 32
- 0027' 56 59
- 25 0029' 0000 0000 0033' _l2_info: defw 0,0,l2rdta,l2wdta,l2eob
- 002F' 0075' 0074'
- 26 0033' 52 4F 53 45 l2rdta: defm 'ROSE X.25 Packet Switch Version 901111 by Thomas A. Moulton, W2VY'
- 0037' 20 58 2E 32
- 003B' 35 20 50 61
- 003F' 63 6B 65 74
- 0043' 20 53 77 69
- 0047' 74 63 68 20
- 004B' 56 65 72 73
- 004F' 69 6F 6E 20
- 0053' 39 30 31 31
- 0057' 31 31 20 62
- 27 0074' 0D l2eob: defb 0dh
- 28 0075' 53 65 65 20 l2wdta: defm 'See READZSW.ME in RZSW1111.ZIP !!!!' ;35 Bytes
- 0079' 52 45 41 44
- 007D' 5A 53 57 2E
- 0081' 4D 45 20 69
- 0085' 6E 20 52 5A
- 0089' 53 57 31 31
- 008D' 31 31 2E 5A
- 0091' 49 50 20 21
- 0095' 21 21 21
- 29 0098' 0D 00 00 00 defb 0dh,0,0,0,0,0,0 ;7 Bytes
- 009C' 00 00 00
- 30 009F' 00 00 00 00 defb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ;18 Bytes = 60 Bytes
-
-
- HI-TECH SOFTWARE Z80 Macro Assembler: rzsw.as
- Page 2
-
-
- 00A3' 00 00 00 00
- 00A7' 00 00 00 00
- 00AB' 00 00 00 00
- 00AF' 00 00
- 31
- 32 00B1' 43 61 6C 6C _complete: defm 'Call Completed to ' ;40 bytes for each message
- 00B5' 20 43 6F 6D
- 00B9' 70 6C 65 74
- 00BD' 65 64 20 74
- 00C1' 6F 20
- 33 00C3' 00 00 00 00 defb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
- 00C7' 00 00 00 00
- 00CB' 00 00 00 00
- 00CF' 00 00 00 00
- 00D3' 00 00 00 00
- 00D7' 00 00
- 34 00D9' 43 61 6C 6C _being_set: defm 'Call being Setup\r'
- 00DD' 20 62 65 69
- 00E1' 6E 67 20 53
- 00E5' 65 74 75 70
- 00E9' 5C 72
- 35 00EB' 00 00 00 00 defb 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
- 00EF' 00 00 00 00
- 00F3' 00 00 00 00
- 00F7' 00 00 00 00
- 00FB' 00 00 00 00
- 00FF' 00 00 00
- 36
- 37 0007 = AXALEN equ 7
- 38 0001 = nnodes equ 1 ;1 nodes in default config
- 39 0000 = nusers equ 0 ; No Level 3 users in default config
- 40 0018 = maxl3 equ 24 ; My Calls + 15 Node Paths + 8 Users
- 41
- 42 GLOBAL _maxl3dev
- 43 0102' 0018 _maxl3dev: defw maxl3 ;Tell rest of world how big it is
- 44
- 45 0104' A4 9E A6 8A mycall: defb 0a4h,9eh,0a6h,08ah,040h,40h,66h ;ROSE-3
- 0108' 40 40 66
- 46 010B' A4 9E A6 8A mydigi: defb 0a4h,9eh,0a6h,08ah,040h,40h,64h ;ROSE-2
- 010F' 40 40 64
- 47 0112' 00 myport: defb 0
- 48 0113' 0000 mydelay: defw 0 ;900 =15 Mins before retry network link
- 49 0115' 14 myvc: defb 20 ;network links can have 20 vc's default
- 50 0116' 04 mywi: defb 4 ;default window of 4
- 51
- 52 0117' 0001 0000* spfcn: defw 1,_loader
- 53 011B' 00 00 defpwd: defb 0,0 ;40 Bytes for KEY
- 54 011D' 52 4F 53 45 defm 'ROSEISBESTABCDEFGHIJKLMNOPQRSTUVWXYZW2VY'
- 0121' 49 53 42 45
- 0125' 53 54 41 42
- 0129' 43 44 45 46
- 012D' 47 48 49 4A
- 0131' 4B 4C 4D 4E
- 0135' 4F 50 51 52
- 0139' 53 54 55 56
-
-
- HI-TECH SOFTWARE Z80 Macro Assembler: rzsw.as
- Page 3
-
-
- 013D' 57 58 59 5A
- 0141' 57 32 56 59
- 55
- 56 0145' 0C19 0104' 0103' initab: defw FLAG2-BSSCK-1,BSSCK+1,BSSCK ;Length, Dest, Src
- 57 014B' 0013 011D' 0000' defw initlen,initbss,initdta
- 58 0151' 0007 0130' 0104' defw 7*nnodes,_L3CALL,mycall
- 59 0157' 0007 01D8' 010B' defw 7*nnodes,_L3DIGI,mydigi
- 60 015D' 0001 0280' 0112' defw nnodes,_L3PORT,myport
- 61 0163' 0001 02E0' 0115' defw nnodes,_L3_MAXVC,myvc
- 62 0169' 0001 02B0' 0116' defw nnodes,_L3_WI,mywi
- 63 016F' 0002 02F8' 0113' defw nnodes*2,_L3DELAY,mydelay
- 64 0175' 000C 0105' 0000* defw 12,l2parms,_dl2parms ;init l2 parms ram table
- 65 017B' 000C 0111' 0000* defw 12,l3parms,_dl3parms ;init l3 parms ram table
- 66 0181' 002A 0C1C' 011B' defw 42,_passlen,defpwd
- 67 0187' 0004 0036' 0117' initwm: defw 4,_maxfcn, spfcn ;Application loader
- 68 018D' 000A 0010' 0000* defw 10,_L2PARS,_dL2PARS ;Hooks for Level 2 User Switching
- 69 0193' 000A 001A' 0000* defw 10,_L3PARS,_dL3PARS ;Hooks for Level 3 Switching
- 70 0199' 0008 0008' 0000* defw 8,_ifaces,_difaces ;Level 1 to Level 2 Hooks 4 ports
- 71 019F' 000A 0000* 0000* defw 10,_entry,_Entry ;Message for Loader
- 72 01A5' 0000 defw 0
- 73
- 74 0000' psect text
- 75 global __init
- 76 0000' __init:
- 77 0000' 3A 0104' ld a,(FLAG1) ;check flags
- 78 0003' FE AA cp 0aah
- 79 0005' 20 1C jp nz,1f
- 80 0007' 3A 0D1D' ld a,(FLAG2)
- 81 000A' FE AA cp 0aah
- 82 000C' 20 15 jp nz,1f
- 83 000E' CD 0050' call sumchk ;compute the checksum (xor of bytes)
- 84 0011' 47 ld b,a
- 85 0012' 3A 0103' ld a,(BSSCK)
- 86 0015' B8 cp b
- 87 0016' 20 0B jp nz,1f
- 88 0018' 21 0029' ld hl,_l2_info
- 89 001B' 22 0124' ld (_l2_user_info),hl ;Only the default message is in rom
- 90 001E' 21 0187' ld hl,initwm ;Warm Start init's
- 91 0021' 18 07 jp initlp
- 92
- 93 0023' AF 1: xor a ;Clear A
- 94 0024' 32 0103' ld (BSSCK),a ;IPAGE and MEMSIZ are set elsewhere
- 95 ;
- 96 0027' 21 0145' ld hl,initab ;start of init table
- 97 002A' 4E initlp: ld c,(hl)
- 98 002B' 23 inc hl
- 99 002C' 46 ld b,(hl)
- 100 002D' 23 inc hl
- 101 002E' 78 ld a,b
- 102 002F' B1 or c ;done yet?
- 103 0030' 28 0F jp z,initeof ;yes, get out!
- 104 0032' 5E ld e,(hl)
- 105 0033' 23 inc hl
- 106 0034' 56 ld d,(hl)
- 107 0035' 23 inc hl
-
-
- HI-TECH SOFTWARE Z80 Macro Assembler: rzsw.as
- Page 4
-
-
- 108 0036' 7E ld a,(hl)
- 109 0037' 23 inc hl
- 110 0038' E5 push hl
- 111 0039' 66 ld h,(hl)
- 112 003A' 6F ld l,a
- 113 003B' ED B0 ldir
- 114 003D' E1 pop hl
- 115 003E' 23 inc hl
- 116 003F' 18 E9 jp initlp
- 117
- 118 0041' initeof:
- 119 0041' 3E AA ld a,0aah
- 120 0043' 32 0104' ld (FLAG1),a
- 121 0046' 32 0D1D' ld (FLAG2),a
- 122
- 123 ; Now set the checksum value for next time.
- 124 0049' _sumchk:
- 125 0049' CD 0050' call sumchk
- 126 004C' 32 0103' ld (BSSCK),a
- 127 004F' C9 ret
- 128
- 129 0050' sumchk:
- 130 0050' 21 0104' ld hl,FLAG1
- 131 0053' 01 0C19 ld bc,FLAG2-FLAG1
- 132 0056' 7E ld a,(hl)
- 133 0057' 23 inc hl
- 134 0058' E5 push hl
- 135 0059' D1 pop de ;source and dest same, the LD is a nop
- 136 005A' AE 1: xor (hl)
- 137 005B' ED A0 ldi
- 138 005D' E0 ret po ;until BC = 0
- 139 005E' 18 FA jp 1b
- 140
- 141 0000' psect bssck ;bss with checksum protection
- 142 global IPAGE, _MEMSIZ, _HEAPUSD, _HEAPSIZ, _COLD
- 143 0000' IPAGE: DEFS 256 ;Interrupt pointer table (HDWINT.AS)
- 144 0100' _MEMSIZ: DEFS 2 ;Size of Dynamic RAM (BOOT.AS)
- 145 0102' _COLD: defs 1 ;Reason for Restart (BOOT.AS)
- 146 0103' BSSCK: defs 1
- 147 0104' FLAG1: defs 1
- 148 0105' l2parms: defs 12
- 149 0111' l3parms: defs 12
- 150 011D' initbss:
- 151 011D' _node_addr: defs AXALEN
- 152 0124' _l2_user_info: defs 2
- 153 0126' _l2parms: defs 2
- 154 0128' _l3parms: defs 2
- 155 012A' _USER_L3_W: defs 2
- 156 012C' _USER_MAXVC: defs 2
- 157 012E' _L3CSIZ: defs 2
- 158 0130' _L3CALL: defs AXALEN*maxl3 ;7 * 18 - 16 Nodes and 8 Users (bbs?)
- 159 01D8' _L3DIGI: defs AXALEN*maxl3
- 160 0280' _L3PORT: defs 2*maxl3
- 161 02B0' _L3_WI: defs 2*maxl3
- 162 02E0' _L3_MAXVC: defs maxl3
-
-
- HI-TECH SOFTWARE Z80 Macro Assembler: rzsw.as
- Page 5
-
-
- 163 02F8' _L3DELAY: defs 2*16 ;2 * 16 Nodes only
- 164 0318' _L3NSIZ: defs 2
- 165 031A' _NPAroute: defs 256 ;16 * 16 Alternatives in routing list
- 166 041A' _userport: defs 2 ;Port number for out-bound User connect requests
- 167 041C' _RTable: defs 2048 ;2K Max Routing Table for the WORLD!
- 168 0C1C' _passlen: defs 1
- 169 0C1D' _passwd: defs 256
- 170 0D1D' FLAG2: defs 1
- 171 0000' psect bss
- 172 global _Init_bss, _SAVE, _SAVEA, _taskq, _timerq, _spcfcn, _maxfcn
- 173 global _ifaces, _L2PARS, _L3PARS, _difaces, _dL2PARS, _dL3PARS
- 174 0000' _Init_bss:
- 175 0000' _HEAPUSD: defs 2
- 176 0002' _HEAPSIZ: defs 2
- 177 0004' _taskq: defs 2
- 178 0006' _timerq: defs 2
- 179 0008' _ifaces: defs 8 ;4 pointers (2 bytes each)
- 180 0010' _L2PARS: defs 10 ;5 pointers (2 bytes each)
- 181 001A' _L3PARS: defs 10 ;5 pointers (2 bytes each)
- 182 0024' _SAVE: defs 2
- 183 0026' _SAVEA: defs 16
- 184 0036' _maxfcn: defs 2
- 185 0038' _spcfcn: defs 32 ; 16 - 2 byte entries
-
-
- HI-TECH SOFTWARE Z80 Macro Assembler: rzsw.as
- Page 6
-
-
-
- ---------- Symbol Table ----------
-
- (ABS) 0000# AXALEN 0007 BSSCK 0103' Copyright 0013' FLAG1 0104' FLAG2 0D1D'
- IPAGE 0000' _COLD 0102' _Entry 0000* _HEAPSIZ 0002' _HEAPUSD 0000' _Init_bss 0000'
- _L2PARS 0010' _L3CALL 0130' _L3CSIZ 012E' _L3DELAY 02F8' _L3DIGI 01D8' _L3NSIZ 0318'
- _L3PARS 001A' _L3PORT 0280' _L3_MAXVC 02E0' _L3_WI 02B0' _MEMSIZ 0100' _NPAroute 031A'
- _NULLFCN 0000* _RTable 041C' _SAVE 0024' _SAVEA 0026' _USER_L3_W 012A' _USER_MAXVC 012C'
- __Lbssck 0000* __init 0000' _being_set 00D9' _clr_boot 0000* _complete 00B1' _con_boot 0000*
- _dL2PARS 0000* _dL3PARS 0000* _difaces 0000* _dl2parms 0000* _dl3parms 0000* _entry 0000*
- _ifaces 0008' _l2_info 0029' _l2_user_info 0124' _l2parms 0126' _l3parms 0128' _loader 0000*
- _maxfcn 0036' _maxl3dev 0102' _node_addr 011D' _passlen 0C1C' _passwd 0C1D' _recv_boot 0000*
- _rst_boot 0000* _send_boot 0000* _spcfcn 0038' _sumchk 0049' _taskq 0004' _timerq 0006'
- _userport 041A' bss 0058# bssck 0D1E# data 01A7# defpwd 011B' initab 0145'
- initbss 011D' initdta 0000' initeof 0041' initlen 0013 initlp 002A' initwm 0187'
- l2eob 0074' l2parms 0105' l2rdta 0033' l2wdta 0075' l3parms 0111' maxl3 0018
- myaddr 0000' mycall 0104' mydelay 0113' mydigi 010B' myport 0112' myvc 0115'
- mywi 0116' nnodes 0001 nusers 0000 spfcn 0117' sumchk 0050' text 0060#
-
- 7 jump optimizations
-