Skip to content

Commit

Permalink
fix issue where detection of already loaded extensions failed
Browse files Browse the repository at this point in the history
  • Loading branch information
TechCowboy committed Mar 19, 2023
1 parent 29a34bd commit dd72aee
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 23 deletions.
Binary file modified apple2/dist/FUJIAPPLE_clean.po
Binary file not shown.
2 changes: 1 addition & 1 deletion apple2/examples/ECHO_SERVER.BAS.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
10050 C = PEEK(X)
10055 PRINT X, C
10060 IF C = 0 OR C > 20 THEN 10140
10070 X = X - C - 1
10070 X = X - C
10080 A$=""
10090 FOR Y = 1 TO C: A$=A$+CHR$(PEEK(X)):X=X+1:NEXT Y
10100 B$ = "FUJIAMP"
Expand Down
2 changes: 1 addition & 1 deletion apple2/examples/READ_WEB.BAS..TXT
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
10030 X = PEEK(1014)+PEEK(1015)*256
10040 X = X - 1
10050 C = PEEK(X): IF C = 0 OR C > 20 THEN 10140
10060 X = X - C - 1
10060 X = X - C
10070 A$=""
10080 FOR Y = 1 TO C: A$=A$+CHR$(PEEK(X)):X=X+1:NEXT Y
10090 B$ = "FUJIAMP"
Expand Down
43 changes: 24 additions & 19 deletions apple2/src/FUJIAPPLE.S
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
;
; EXT_TRACE and EXT2_TRACE includes calls into the SMARTPORT routines

STRIP_TRACE= 1 ; Eliminate all tracing code and strings
STRIP_TRACE= 0 ; Eliminate all tracing code and strings
TRACE_ON = 1 ; &NTRACE is on at the very start
EXT_TRACE = 1 ; Extended Trace, 1=display SMARTPORT internal debug messages
EXT_TRACE = 0 ; Extended Trace, 1=display SMARTPORT internal debug messages
EXT2_TRACE = 0 ; Extended Trace 2, display SP_STATUS and SP_CONTROL
RELOCATE = 1 ; 1=relocate himem and put our code there
PRODOS = 1 ; 0=add dos 3.3 header
Expand Down Expand Up @@ -185,9 +185,13 @@ NEXT_NETWORK_CACHE:
JSR RELOCATE_TO_HIMEM ; copy the code and data, adjust all absolute addresses
.ENDIF

relocate000: JSR FILL_CMD_LIST ; let's fix all the smartport instruction data now that
relocate000: JSR FILL_CMD_LIST ; let's fix all the smartport instruction data now that
; everything has been relocated

.IF .NOT USE_SP
JSR GET_SMARTPORT_DISPATCH_ADDRESS ; address would have changed during relocation
.ENDIF

.IF RELOCATE

.IF .NOT STRIP_TRACE
Expand Down Expand Up @@ -249,10 +253,10 @@ CPY_SIG:
LDA SIGNATURE_STR,X
relocate006: STA SIGNATURE,X
INX
CPX #SIG_SIZE
BNE CPY_SIG
LDA #SIG_SIZE
STA SIGNATURE,X

relocate007: STA SIGNATURE,X


.IF RELOCATE
Expand Down Expand Up @@ -321,6 +325,7 @@ RELOCATE_CODE_START:
SIGNATURE:
.BYTE $EA,$EA,$EA,$EA,$EA,$EA,$EA
.BYTE $EA

;****************************************
; NSTART - FUJINET EXTENSION START
; THIS IS THE ENTRY POINT OF THE AMPERSAND ROUTINE
Expand Down Expand Up @@ -1361,39 +1366,39 @@ RELOCATE_CODE_END:

;**************************************

relocate007:
relocate008:
RELOC_NSTART: .WORD NSTART

COMMANDS:
.ASCIIZ "NOPEN" ; NOPEN
relocate008: .WORD NOPEN-1
relocate009: .WORD NOPEN-1

.BYTE 'N', TOK_READ, 00 ; NREAD
relocate009: .WORD NREAD-1
relocate010: .WORD NREAD-1

.ASCIIZ "NWRITE" ; NWRITE
relocate010: .WORD NWRITE-1
relocate011: .WORD NWRITE-1

.ASCIIZ "NCTRL" ; NCTRL
relocate011: .WORD NCTRL-1
relocate012: .WORD NCTRL-1

.BYTE "NST", TOK_AT, "US", 0 ; NSTATUS
relocate012: .WORD NSTATUS-1
relocate013: .WORD NSTATUS-1

.ASCIIZ "NCLOSE" ; NCLOSE
relocate013: .WORD NCLOSE-1
relocate014: .WORD NCLOSE-1

.BYTE "N", TOK_END, 0 ; NEND
relocate014: .WORD NEND-1
relocate015: .WORD NEND-1

.BYTE "N", TOK_LIST, 0 ; NLIST
relocate015: .WORD NLIST-1
relocate016: .WORD NLIST-1

.ASCIIZ "NACCEPT" ; NACCEPT
relocate016: .WORD NACCEPT-1
relocate017: .WORD NACCEPT-1

.BYTE "N", TOK_INPUT, 0 ; NINPUT
relocate017: .WORD NINPUT-1
relocate018: .WORD NINPUT-1

.IF .NOT STRIP_TRACE
.BYTE "N", TOK_TRACE, 0 ; NTRACE
Expand Down Expand Up @@ -1428,20 +1433,20 @@ URL:
.ASCIIZ "N:HTTPS://www.gnu.org/licenses/gpl-3.0.txt"
.ENDIF
.RES 255
relocate018:
relocate019:
URL_ADDR: .WORD URL
COMMAND: .BYTE 0 ; FUJINET COMMAND
BASIC_PAYLOAD: .RES 255 ; PAYLOAD TO SEND
BW: .WORD 0 ; BYTES WAITING
CONNECT: .BYTE 0 ; 1=CONNECTED
BUFLEN: .BYTE 0
BUF: .RES 255 ; GENERIC BUFFER FOR READ/WRITE
relocate019:
relocate020:
BUF_ADDR: .WORD BUF
STRADDR: .WORD 0
STRLEN: .BYTE 0
STRBUF: .RES 255
relocate020:
relocate021:
STRBUF_ADDR: .WORD STRBUF
NETWORK_CACHE: .BYTE FN_NO_NETWORK, FN_NO_NETWORK, FN_NO_NETWORK, FN_NO_NETWORK
OPEN_LIST: .BYTE FN_NO_NETWORK, FN_NO_NETWORK, FN_NO_NETWORK, FN_NO_NETWORK ; BASIC UNIT INDEX TO ACTUAL UNIT
Expand Down
4 changes: 2 additions & 2 deletions apple2/src/FUJIAPPLE_RELOC.S
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; in FUJIAPPLE.S
.WORD relocate000+1,relocate001+1,relocate002+1,relocate003+1,relocate004+1,relocate005+1,relocate006+1,relocate007,relocate008,relocate009
.WORD relocate000+1,relocate001+1,relocate002+1,relocate003+1,relocate004+1,relocate005+1,relocate006+1,relocate007+1,relocate008,relocate009
.WORD relocate010,relocate011,relocate012,relocate013,relocate014,relocate015,relocate016,relocate017,relocate018,relocate019
.WORD relocate020;,relocate021,relocate022,relocate023,relocate024,relocate025,relocate026,relocate027,relocate028,relocate029
.WORD relocate020,relocate021;,relocate022,relocate023,relocate024,relocate025,relocate026,relocate027,relocate028,relocate029

0 comments on commit dd72aee

Please sign in to comment.