1
0
mirror of https://github.com/dschmenk/PLASMA.git synced 2024-07-05 04:28:57 +00:00

Don't close(0) in SOS - it closes the console, too.

This commit is contained in:
David Schmenk 2014-12-30 13:17:55 -08:00
parent ac3c5164d7
commit b81dace901
2 changed files with 12 additions and 9 deletions

View File

@ -21,7 +21,7 @@ byte = "| / | (_) | | (_ || |_| || _|\n"
byte = "|_|_\\ \\___/ \\___| \\___/ |___|\n"
byte = "\n"
byte = " By Resman\n"
byte = " Artwork by Seth Sternberg\n"
byte = " Artwork by Seth Sternberger\n"
byte = ""
word titlestr = @initstr
@ -165,7 +165,7 @@ def a3newline(refnum, emask, nlchar)
params.0 = 3
params.1 = refnum
params.2 = emask
params.2 = $FF
params.3 = nlchar
return syscall($C9, @params)
end

View File

@ -850,11 +850,11 @@ def allocalignheap(size, pow2, freeaddr)
return addr
end
def markheap
return heap//
return heap
end
def releaseheap(newheap)
heap = newheap//
return @newheap - heap//
heap = newheap
return @newheap - heap
end
//
// Symbol table routines.
@ -962,8 +962,10 @@ def loadmod(mod)
//
while ^moddep
if !lookupmod(moddep)
close(refnum)
refnum = 0
if refnum
close(refnum)
refnum = 0
fin
if loadmod(moddep) < 0
return -perr
fin
@ -996,7 +998,7 @@ def loadmod(mod)
//
// Read in remainder of module into memory for fixups.
//
addr = modaddr//
addr = modaddr
repeat
addr = addr + rdlen
rdlen = read(refnum, addr, 4096)
@ -1252,7 +1254,8 @@ def execmod(modfile)
seg_release(modseg[modid])
loop
else
perr = perr & ~modkeep
modid = 0
perr = perr & ~(modinitkeep | modkeep)
fin
systemflags = saveflags
fin