1.1.3 works
This commit is contained in:
parent
771d40fab7
commit
b25f08cdae
Binary file not shown.
|
@ -7,7 +7,7 @@
|
|||
; extension number 18
|
||||
ExtNb equ 18-1
|
||||
Version MACRO
|
||||
dc.b "1.1.2-20240318"
|
||||
dc.b "1.1.3-20240417"
|
||||
ENDM
|
||||
VerNumber equ $1
|
||||
|
||||
|
@ -56,7 +56,6 @@ SO_REUSEADDR EQU $4
|
|||
MAX_SOCKETS EQU 64
|
||||
|
||||
len_sockaddr_in EQU 16
|
||||
sockaddr_in_sin_len EQU 0
|
||||
sockaddr_in_sin_family EQU 1
|
||||
sockaddr_in_sin_port EQU 2
|
||||
sockaddr_in_sin_addr EQU 4
|
||||
|
@ -142,19 +141,20 @@ LeaFdset MACRO
|
|||
; LeaFdsetForBit fd_set reg,target address,target bit in address
|
||||
LeaFdsetForBit MACRO
|
||||
LeaFdset \1,\2 ; get fdset base address in \2
|
||||
MOVE.L D3,-(SP)
|
||||
MOVEM.L D3-D4,-(SP)
|
||||
MOVE.L \3,D3 ; Put target bit into D3
|
||||
ROR.L #5,D3 ; lop off the first 5 bits
|
||||
AND.L #$7,D3 ; only keep the top three
|
||||
ROL.L #2,D3 ; multiply by 4
|
||||
ADD.L D3,\2 ; add that value to the fdset address
|
||||
|
||||
AND.L #$1F,\3 ; only keep 0-31 in \3
|
||||
MOVE.L \3,D4
|
||||
AND.L #$1F,D4 ; only keep 0-31 in \3
|
||||
|
||||
MOVEQ #1,D3
|
||||
ROL.L \3,D3 ; shift that bit left as many as target
|
||||
ROL.L D4,D3 ; shift that bit left as many as target
|
||||
MOVE.L D3,\3 ; put that in the target
|
||||
MOVE.L (SP)+,D3
|
||||
MOVEM.L (SP)+,D3-D4
|
||||
|
||||
ENDM
|
||||
|
||||
|
@ -533,14 +533,17 @@ _ToSockaddr_PortOK:
|
|||
MOVE.L sockaddr_ram-MB(A3),A0
|
||||
ADD.L D3,A0 ; A0 contains our offset in ram
|
||||
|
||||
MOVE.B #len_sockaddr_in,sockaddr_in_sin_len(A0)
|
||||
MOVE.B #AF_INET,sockaddr_in_sin_family(A0)
|
||||
MOVE.W D2,sockaddr_in_sin_port(A0)
|
||||
|
||||
MOVEM.L A0-A3/D3,-(SP)
|
||||
MOVE.L D1,A1 ; ip string address
|
||||
MOVE.W (A1)+,D3 ; string length
|
||||
|
||||
MOVE.L D1,A0 ; ip address
|
||||
ADDQ #2,A0 ; string data starts 2 bytes in
|
||||
; temporarily store a null-terminated copy of the ip string in A0
|
||||
MOVE.L A0,A2
|
||||
SUBQ #1,D3 ; DBRA loop runs D3 + 1 times
|
||||
_ToSockaddr_CopyIPString:
|
||||
MOVE.B (A1)+,(A2)+
|
||||
DBRA D3,_ToSockaddr_CopyIPString
|
||||
MOVE.B #0,(A2) ; end of string
|
||||
|
||||
; if the string contains "INADDR_ANY", we use that value instead
|
||||
MOVE.L A0,A1
|
||||
|
@ -565,7 +568,15 @@ _ToSockaddr_ParseIPAddress:
|
|||
|
||||
_ToSockaddr_DoneParsing:
|
||||
MOVEM.L (SP)+,A0-A3/D3
|
||||
MOVE.L D0,sockaddr_in_sin_addr(A0)
|
||||
|
||||
; create struct sockaddr_in
|
||||
MOVE.B #len_sockaddr_in,(A0)
|
||||
MOVE.B #AF_INET,sockaddr_in_sin_family(A0)
|
||||
MOVE.W D2,sockaddr_in_sin_port(A0)
|
||||
LEA sockaddr_in_sin_addr(A0),A3
|
||||
MOVE.L D0,(A3)+
|
||||
CLR.L (A3)+
|
||||
CLR.L (A3)+
|
||||
|
||||
MOVE.L A0,D0
|
||||
MOVEM.L (SP)+,A0/A3/D3
|
||||
|
@ -1999,6 +2010,8 @@ _DnsGetHostAddressByName_GetIPAddressLength:
|
|||
BNE _DnsGetHostAddressByName_GetIPAddressLength
|
||||
MOVE.L (SP)+,A2
|
||||
|
||||
SUBQ #1,D3
|
||||
|
||||
MOVE.L D3,D4
|
||||
AND.W #$FFFE,D3
|
||||
ADDQ #2,D3
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
; BSDSocket.s, list of the library functions on the 25-04-2024 16:01:54
|
||||
; BSDSocket.s, list of the library functions on the 25-04-2024 17:02:36
|
||||
;
|
||||
; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
L_Cold: set 0
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
; BSDSocket.s, library size on the 25-04-2024 16:01:54
|
||||
; BSDSocket.s, library size on the 25-04-2024 17:02:36
|
||||
;
|
||||
; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
Lib_Size equ 39
|
||||
|
|
Loading…
Reference in New Issue