device zxspectrum128
IFDEF NEDOOS
MODULE nos
include "../_sdk/sysdefs.asm"
ENDMODULE
org nos.PROGSTART
ELSE
org 24576
ENDIF
asmOrg:
jp start
; Generate version string
LUA ALLPASS
v = tostring(sj.get_define("V"))
maj = string.sub(v, 1,1)
min = string.sub(v, 2,2)
sj.insert_define("VERSION_STRING", "\"" .. maj .. "." .. min .. "\"")
ENDLUA
include "vdp/index.asm"
include "utils/index.asm"
include "gopher/render/index.asm"
include "dos/index.asm"
include "gopher/engine/history/index.asm"
include "gopher/engine/urlencoder.asm"
include "gopher/engine/fetcher.asm"
include "gopher/engine/media-processor.asm"
include "gopher/gopher.asm"
include "drivers/index.asm"
IFNDEF NEDOOS
include "player/vortex-processor.asm"
include "screen/screen.asm"
ELSE
include "screen/nedoscreen.asm"
include "player/vortexnedoos.asm"
ENDIF
start:
IFNDEF NEDOOS
outputBuffer:
di
ld sp, asmOrg
call Memory.init
ei
ld a, 7 : call Memory.setPage
;; Logo
ld hl, logo, b, Dos.FMODE_READ : call Dos.fopen
push af
ld hl, #c000, bc, 6912 : call Dos.fread
pop af
call Dos.fclose
ld b, 150
1 halt
djnz 1b
;; End of logo :-)
ELSE
ld sp, 0x4000
ENDIF
call TextMode.init
IFDEF NEDOOSATM
call Wifi.init
ENDIF
IFNDEF NEDOOS
ld hl, initing : call TextMode.printZ
call Wifi.init
ENDIF
jp History.home
IFDEF NEDOOS
outputBuffer:
ENDIF
initing db "Initing Wifi...",13,10,0
logo db "data/logo.scr", 0
display "ENDS: ", $
display "Buff size", #ffff - $
IFDEF NEDOOS
savebin "moon.com", asmOrg, $ - asmOrg
ELSE
savebin "moon.bin", asmOrg, $ - asmOrg
ENDIF