Category : Network Files
Archive   : PKTD11A.ZIP
Filename : AT1500.ASM

 
Output of file : AT1500.ASM contained in archive : PKTD11A.ZIP
version equ 1

; Copyright, 1990-1992, Russell Nelson, Crynwr Software

; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation, version 1.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program; if not, write to the Free Software
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


.286 ;the at1500 requires a 286.

include defs.asm

EBASE equ 0
DATA_REG equ 10h
ADDR_REG equ DATA_REG+2
ISAC_REG equ DATA_REG+6

code segment para public
assume cs:code, ds:code

public int_no
int_no db ?,0,0,0 ;must be four bytes long for get_number.
io_addr dw -1,-1
dma_no db ?,0,0,0

public driver_class, driver_type, driver_name, driver_function, parameter_list
driver_class db BLUEBOOK, IEEE8023, 0 ;from the packet spec
driver_type db 98 ;from the packet spec
driver_name db 'Allied Telesis 1500',0 ;name of the driver.
driver_function db 2 ;basic, extended
parameter_list label byte
db 1 ;major rev of packet driver
db 9 ;minor rev of packet driver
db 14 ;length of parameter list
db EADDR_LEN ;length of MAC-layer address
dw GIANT ;MTU, including MAC headers
dw MAX_MULTICAST * EADDR_LEN ;buffer size of multicast addrs
dw RECEIVE_BUF_COUNT-1 ;(# of back-to-back MTU rcvs) - 1
dw TRANSMIT_BUF_COUNT-1 ;(# of successive xmits) - 1
int_num dw 0 ;Interrupt # to hook for post-EOI
;processing, 0 == none,

reset_lance macro
mov ax,CSR0_STOP
outport CSR0 ;should use hardware reset here
endm

include lance.asm

public usage_msg
usage_msg db "usage: at1500 [options] ",CR,LF,'$'
no_board_msg db "No at1500 detected.",CR,LF,'$'
bad_reset_msg db "Unable to reset the at1500.",CR,LF,'$'
bad_init_msg db "Unable to initialize the at1500.",CR,LF,'$'
no_memory_msg db "Unable to allocate enough memory, look at end_resident in at1500.ASM",CR,LF,'$'

public copyright_msg
copyright_msg db "Packet driver for an at1500, version ",'0'+(majver / 10),'0'+(majver mod 10),".",'0'+lance_version,".",'0'+version,CR,LF
db '$'

public parse_args
parse_args:
;exit with nc if all went well, cy otherwise.
assume ds:code
mov di,offset io_addr
call get_number
clc
ret

check_board:
assume ds:code
cmp io_addr,-1 ;Did they ask for auto-detect?
je find_board

mov di,io_addr
call verifyboard
jnc find_board_found

mov dx,offset no_board_msg ;Tell them that we can't find it.
stc
ret

find_board:
mov io_addr,300h ;Search for the Ethernet address.
mov io_addr+2,0
find_board_0:
mov di,io_addr
call verifyboard
jnc find_board_found
find_board_again:
add io_addr,20h ;not at this port, try another.
cmp io_addr,360h
jbe find_board_0

mov dx,offset no_board_msg ;Tell them that we can't find it.
stc
ret
find_board_found:
mov int_no,bl
mov dma_no,bh

loadport ;CX = value to be output to ISACR 2.
setport ADDR_REG
mov ax,2
out dx,ax
in ax,dx
setport ISAC_REG
mov ax,cx
out dx,ax
in ax,dx
clc
check_board_1:
ret

code ends

CODESEG EQU
DATASEG EQU
DATAGROUP EQU
include eep15.inc

end



  3 Responses to “Category : Network Files
Archive   : PKTD11A.ZIP
Filename : AT1500.ASM

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/