From d8239a683d30f99b11fef49ab6ec2ec061363d96 Mon Sep 17 00:00:00 2001 From: Noam Preil Date: Wed, 1 Jul 2020 16:25:41 -0400 Subject: [PATCH 01/19] Replace .exec with define in Makefile --- Makefile | 8 +++++--- src/00/header.asm | 3 +-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 404a655..2f0a7d1 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,13 @@ # Makefile for KnightOS kernel -AS=sass -ASFLAGS=--encoding "Windows-1252" +AS=scas +#ASFLAGS=--encoding "Windows-1252" .DEFAULT_GOAL=TI84pSE PLATFORM:=TI84pSE TAG:=$(shell git describe --abbrev=0) OUTDIR=bin/ +KERNEL_VERSION = -DKERNEL_VERSION=$(shell git describe --dirty=+) + # Platforms: # Variables (all in hex): # PRIVILEGED: The address of the privileged page @@ -65,7 +67,7 @@ TI84pCSE: BOOT := 3FC000 TI84pCSE: LENGTH := 0x400000 TI84pCSE: kernel $(OUTDIR) -DEFINES=--define $(PLATFORM) +DEFINES=--define $(PLATFORM) $(KERNEL_VERSION) BINDIR=$(OUTDIR)$(PLATFORM)/ INCLUDE=include/;$(BINDIR) diff --git a/src/00/header.asm b/src/00/header.asm index 677f6d7..8efb5b1 100644 --- a/src/00/header.asm +++ b/src/00/header.asm @@ -44,5 +44,4 @@ rlcall: ; 0x0056 .db 0xFF, 0xA5, 0xFF .fill 0x64-$ -.exec git describe --dirty=+ ; Version string -.db 0 +.asciiz "KERNEL_VERSION" From 294ff4a121dbd8ff6a091ee2122f3c1811462a65 Mon Sep 17 00:00:00 2001 From: Noam Preil Date: Wed, 1 Jul 2020 16:28:33 -0400 Subject: [PATCH 02/19] Install scas instead of sass in CI --- .build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.build.yml b/.build.yml index db70ad3..1276214 100644 --- a/.build.yml +++ b/.build.yml @@ -2,7 +2,7 @@ image: archlinux packages: - mono - make - - sass + - scas - mktiupgrade - genkfs - mkrom From 91036fdccb3ce50a5aa16373a00457194e9527bf Mon Sep 17 00:00:00 2001 From: Noam Preil Date: Wed, 1 Jul 2020 16:32:20 -0400 Subject: [PATCH 03/19] Use KnightOS/scas#63 for now --- .build.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.build.yml b/.build.yml index 1276214..090831c 100644 --- a/.build.yml +++ b/.build.yml @@ -2,16 +2,24 @@ image: archlinux packages: - mono - make - - scas - mktiupgrade - genkfs - mkrom - patchrom sources: - https://github.com/KnightOS/kernel + - https://github.com/KnightOS/scas environment: project: kernel tasks: + - scas: | + cd scas + gco fix_kernel_assembly + mkdir build + cd build + cmake .. + make + make install - ti73: | cd ${project} make TI73 From bcf1b502ab0f07d6c98bb7c1b1512c5f6e4da596 Mon Sep 17 00:00:00 2001 From: Noam Preil Date: Thu, 2 Jul 2020 19:46:17 -0400 Subject: [PATCH 04/19] Verbose output, for development purposes --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 2f0a7d1..df5e58b 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ # Makefile for KnightOS kernel AS=scas +ASFLAGS=-vvvv #ASFLAGS=--encoding "Windows-1252" .DEFAULT_GOAL=TI84pSE PLATFORM:=TI84pSE From 8481f7614387525375e1a79d9eaa004a7ff1931a Mon Sep 17 00:00:00 2001 From: Noam Preil Date: Thu, 2 Jul 2020 19:49:01 -0400 Subject: [PATCH 05/19] Fix syntax for binary --- src/00/random.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/00/random.asm b/src/00/random.asm index 16f6088..75a53cd 100644 --- a/src/00/random.asm +++ b/src/00/random.asm @@ -47,7 +47,7 @@ getRandom: add hl, hl \ rl c \ rl b ld (random_seed+6), bc sbc a, a - and %11000101 + and 0b11000101 xor l ld l, a ld (random_seed+4), hl From 3731570e36258c36571c54c751e548095e1e456c Mon Sep 17 00:00:00 2001 From: Noam Preil Date: Sun, 5 Jul 2020 17:50:29 -0400 Subject: [PATCH 06/19] Fix wrong case --- src/00/locks.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/00/locks.asm b/src/00/locks.asm index 830e726..dd4a704 100644 --- a/src/00/locks.asm +++ b/src/00/locks.asm @@ -90,7 +90,7 @@ hasUSBLock: push hl push af call getCurrentThreadId - ld hl, hwLockUsb + ld hl, hwLockUSB cp (hl) pop hl ld a, h From 32c6cd91333f2d3a82e125f8ee6935320ff3000a Mon Sep 17 00:00:00 2001 From: Noam Preil Date: Fri, 11 Sep 2020 04:51:24 -0400 Subject: [PATCH 07/19] Update equ style --- src/02/crypto.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/02/crypto.asm b/src/02/crypto.asm index eb4fd06..8371934 100644 --- a/src/02/crypto.asm +++ b/src/02/crypto.asm @@ -44,7 +44,7 @@ sha1Init: .defaultMemblock: ; Holds the completed hash. -sha1_hash .equ $ - .defaultMemblock +.equ sha1_hash, $ - .defaultMemblock .db 0x67,0x45,0x23,0x01 .db 0xEF,0xCD,0xAB,0x89 .db 0x98,0xBA,0xDC,0xFE From edb9f7bda8646ccfef970c650d007c23dc420b98 Mon Sep 17 00:00:00 2001 From: Noam Preil Date: Fri, 11 Sep 2020 04:51:48 -0400 Subject: [PATCH 08/19] Fix hex style --- src/02/crypto.asm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/02/crypto.asm b/src/02/crypto.asm index 8371934..1b4f6b9 100644 --- a/src/02/crypto.asm +++ b/src/02/crypto.asm @@ -107,13 +107,13 @@ sha1Pad_noPush: ; append the bit '1' to the message ; append 0 <= k < 512 bits '0', so that the resulting message length (in bits) ; is congruent to 448 = -64 (mod 512) - ld a, $80 + ld a, 0x80 .zero: call sha1AddByte_noLength ld a, (ix + sha1_block_front_ptr) add a, 56 cp (ix + sha1_block_ptr) - ld a, $00 + ld a, 0x00 jr nz, .zero ; append length of message (before padding), in bits, as 64-bit big-endian integer push ix \ pop hl @@ -223,10 +223,10 @@ sha1ProcessBlock: dec hl ld (ix + sha1_block_ptr), l ld (ix + sha1_block_ptr + 1), h - ld hl, sha1Operation_mux \ call sha1Do20Rounds \ .db $5A,$82,$79,$99 - ld hl, sha1Operation_xor \ call sha1Do20Rounds \ .db $6E,$D9,$EB,$A1 - ld hl, sha1Operation_maj \ call sha1Do20Rounds \ .db $8F,$1B,$BC,$DC - ld hl, sha1Operation_xor \ call sha1Do20Rounds \ .db $CA,$62,$C1,$D6 + ld hl, sha1Operation_mux \ call sha1Do20Rounds \ .db 0x5A,0x82,0x79,0x99 + ld hl, sha1Operation_xor \ call sha1Do20Rounds \ .db 0x6E,0xD9,0xEB,0xA1 + ld hl, sha1Operation_maj \ call sha1Do20Rounds \ .db 0x8F,0x1B,0xBC,0xDC + ld hl, sha1Operation_xor \ call sha1Do20Rounds \ .db 0xCA,0x62,0xC1,0xD6 ; Add this chunk's hash to result so far ; h0 += a From e67aafcfb6c87d51356a9b9278e82760c5115e10 Mon Sep 17 00:00:00 2001 From: Noam Preil Date: Fri, 11 Sep 2020 04:51:56 -0400 Subject: [PATCH 09/19] Fix boot page --- src/boot/base.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/boot/base.asm b/src/boot/base.asm index 7741975..854f2d4 100644 --- a/src/boot/base.asm +++ b/src/boot/base.asm @@ -1,7 +1,7 @@ #include "constants.asm" ; Dummy boot page to get emulators to boot the OS jr _ - .fill 0x0F - $ + .block 0x0F - $ .db "Emulated", 0 _: in a, (PORT_FLASHRAMSIZE) From 19ecd7139bc5193db84b8c011ccf2cb9f9cb3ab6 Mon Sep 17 00:00:00 2001 From: Noam Preil Date: Fri, 11 Sep 2020 04:52:53 -0400 Subject: [PATCH 10/19] Update tag --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index df5e58b..4b31344 100644 --- a/Makefile +++ b/Makefile @@ -4,10 +4,10 @@ ASFLAGS=-vvvv #ASFLAGS=--encoding "Windows-1252" .DEFAULT_GOAL=TI84pSE PLATFORM:=TI84pSE -TAG:=$(shell git describe --abbrev=0) +TAG:=$(shell git describe --abbrev=0 --dirty=+) OUTDIR=bin/ -KERNEL_VERSION = -DKERNEL_VERSION=$(shell git describe --dirty=+) +KERNEL_VERSION = -DKERNEL_VERSION=$(TAG) # Platforms: # Variables (all in hex): From 147dca224c875275aa86c92cf42b135a475ae451 Mon Sep 17 00:00:00 2001 From: Noam Preil Date: Fri, 11 Sep 2020 04:54:03 -0400 Subject: [PATCH 11/19] Reduce verbosity --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4b31344..820994d 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Makefile for KnightOS kernel AS=scas -ASFLAGS=-vvvv +ASFLAGS=-v #ASFLAGS=--encoding "Windows-1252" .DEFAULT_GOAL=TI84pSE PLATFORM:=TI84pSE From b1dd7f456e26680ba4bd81a49a55eb3a82200579 Mon Sep 17 00:00:00 2001 From: Noam Preil Date: Sat, 10 Oct 2020 01:33:16 -0400 Subject: [PATCH 12/19] fix ci --- .build.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.build.yml b/.build.yml index 090831c..fdf6d47 100644 --- a/.build.yml +++ b/.build.yml @@ -1,6 +1,5 @@ image: archlinux packages: - - mono - make - mktiupgrade - genkfs @@ -14,12 +13,11 @@ environment: tasks: - scas: | cd scas - gco fix_kernel_assembly mkdir build cd build cmake .. make - make install + sudo make install - ti73: | cd ${project} make TI73 From 685309bea8e068de5f00f08d9cc6edb8e2d6c915 Mon Sep 17 00:00:00 2001 From: Noam Preil Date: Sat, 10 Oct 2020 15:47:21 -0400 Subject: [PATCH 13/19] Simplify makefile --- Makefile | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 820994d..b985051 100644 --- a/Makefile +++ b/Makefile @@ -112,20 +112,10 @@ baserom: mkdir -p $(BINDIR) mkrom $(BINDIR)kernel.rom $(LENGTH) /dev/null:0x00 -$(OUTDIR)$(PLATFORM)/00.bin: src/00/*.asm include/constants.asm src/00/jumptable.config +$(OUTDIR)$(PLATFORM)/%.bin: src/%/*.asm include/constants.asm src/%/jumptable.config @mkdir -p $(BINDIR) - $(AS) $(ASFLAGS) $(DEFINES) --include "$(INCLUDE);src/00/" --symbols $(BINDIR)00.sym --listing $(BINDIR)00.list src/00/base.asm $(BINDIR)00.bin - patchrom src/00/jumptable.config $(BINDIR)kernel.rom 00 < $(BINDIR)00.sym > $(BINDIR)00.inc - -$(OUTDIR)$(PLATFORM)/01.bin: $(OUTDIR)$(PLATFORM)/00.bin src/01/*.asm include/constants.asm src/01/jumptable.config - @mkdir -p $(BINDIR) - $(AS) $(ASFLAGS) $(DEFINES) --include "$(INCLUDE);src/01/" --symbols $(BINDIR)01.sym --listing $(BINDIR)01.list src/01/base.asm $(BINDIR)01.bin - patchrom src/01/jumptable.config $(BINDIR)kernel.rom 01 < $(BINDIR)01.sym > $(BINDIR)01.inc - -$(OUTDIR)$(PLATFORM)/02.bin: $(OUTDIR)$(PLATFORM)/00.bin src/02/*.asm include/constants.asm src/02/jumptable.config - @mkdir -p $(BINDIR) - $(AS) $(ASFLAGS) $(DEFINES) --include "$(INCLUDE);src/02/" --symbols $(BINDIR)02.sym --listing $(BINDIR)02.list src/02/base.asm $(BINDIR)02.bin - patchrom src/02/jumptable.config $(BINDIR)kernel.rom 02 < $(BINDIR)02.sym > $(BINDIR)02.inc + $(AS) $(ASFLAGS) $(DEFINES) --include "$(INCLUDE);src/$*/" --symbols $(BINDIR)$*.sym --listing $(BINDIR)$*.list src/$*/base.asm $(BINDIR)$*.bin + patchrom src/$*/jumptable.config $(BINDIR)kernel.rom $* < $(BINDIR)$*.sym > $(BINDIR)$*.inc $(OUTDIR)$(PLATFORM)/privileged.bin: src/privileged/*.asm include/constants.asm $(OUTDIR)$(PLATFORM)/00.bin @mkdir -p $(BINDIR) From 8e5137815caea9f07582adefb3a3aca554d416a6 Mon Sep 17 00:00:00 2001 From: Noam Preil Date: Sat, 10 Oct 2020 05:55:39 -0400 Subject: [PATCH 14/19] Specify -o --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index b985051..e8d198c 100644 --- a/Makefile +++ b/Makefile @@ -114,16 +114,16 @@ baserom: $(OUTDIR)$(PLATFORM)/%.bin: src/%/*.asm include/constants.asm src/%/jumptable.config @mkdir -p $(BINDIR) - $(AS) $(ASFLAGS) $(DEFINES) --include "$(INCLUDE);src/$*/" --symbols $(BINDIR)$*.sym --listing $(BINDIR)$*.list src/$*/base.asm $(BINDIR)$*.bin + $(AS) $(ASFLAGS) $(DEFINES) --include "$(INCLUDE);src/$*/" --symbols $(BINDIR)$*.sym --listing $(BINDIR)$*.list src/$*/base.asm -o $(BINDIR)$*.bin patchrom src/$*/jumptable.config $(BINDIR)kernel.rom $* < $(BINDIR)$*.sym > $(BINDIR)$*.inc $(OUTDIR)$(PLATFORM)/privileged.bin: src/privileged/*.asm include/constants.asm $(OUTDIR)$(PLATFORM)/00.bin @mkdir -p $(BINDIR) - $(AS) $(ASFLAGS) $(DEFINES) --include "$(INCLUDE);src/privileged/" --listing $(BINDIR)priviledged.list src/privileged/base.asm $(BINDIR)privileged.bin + $(AS) $(ASFLAGS) $(DEFINES) --include "$(INCLUDE);src/privileged/" --listing $(BINDIR)priviledged.list src/privileged/base.asm -o $(BINDIR)privileged.bin $(OUTDIR)$(PLATFORM)/boot.bin: src/boot/*.asm include/constants.asm @mkdir -p $(BINDIR) - $(AS) $(ASFLAGS) $(DEFINES) --include "$(INCLUDE);src/boot/" --listing $(BINDIR)boot.list src/boot/base.asm $(BINDIR)boot.bin + $(AS) $(ASFLAGS) $(DEFINES) --include "$(INCLUDE);src/boot/" --listing $(BINDIR)boot.list src/boot/base.asm -o $(BINDIR)boot.bin clean: rm -rf $(OUTDIR) From 7823a0db643261b4d31be229cf05747c41d0bce1 Mon Sep 17 00:00:00 2001 From: Noam Preil Date: Sat, 10 Oct 2020 17:12:13 -0400 Subject: [PATCH 15/19] Update license --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index d785a5c..33ca992 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2014 The KnightOS Group +Copyright (c) 2014-2020 The KnightOS Group Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: From 3262b6620feb54ec226f03f893bd1372dad60e86 Mon Sep 17 00:00:00 2001 From: Noam Preil Date: Wed, 29 Jan 2020 15:40:42 -0500 Subject: [PATCH 16/19] Implement relocation tables in KEXC binaries --- doc/kexc | 19 ++++++++-------- include/defines.inc | 1 + src/00/thread.asm | 53 ++++++++++++++++++++++++++++++++++++++++----- 3 files changed, 59 insertions(+), 14 deletions(-) diff --git a/doc/kexc b/doc/kexc index 6a50216..24ab7f8 100644 --- a/doc/kexc +++ b/doc/kexc @@ -35,15 +35,16 @@ good idea. The following headers are defined in kernel.inc: - Name Description - - KEXC_HEADER_END The end of the header list. Value may be omitted. - KEXC_ENTRY_POINT Pointer to executable entry point. - KEXC_STACK_SIZE Bytes of stack required, divided by two. - KEXC_KERNEL_VER Minimum kernel version supported. Major, minor. - KEXC_THREAD_FLAGS Thread flags. Only the upper 8 bits are considered. - KEXC_NAME Pointer to program name. - KEXC_DESCRIPTION Pointer to program description. + Name Description + + KEXC_HEADER_END The end of the header list. Value may be omitted. + KEXC_ENTRY_POINT Pointer to executable entry point. + KEXC_STACK_SIZE Bytes of stack required, divided by two. + KEXC_KERNEL_VER Minimum kernel version supported. Major, minor. + KEXC_THREAD_FLAGS Thread flags. Only the upper 8 bits are considered. + KEXC_NAME Pointer to program name. + KEXC_DESCRIPTION Pointer to program description. + KEXC_RELOCATION_TABLE Pointer to the relocation table. Header keys are numbered from 0x00-0xFF, inclusive. The 0x00-0x7F range is reserved for kernel use, and 0x80-0xFF is available for arbitrary use. diff --git a/include/defines.inc b/include/defines.inc index f6f0b9d..5991a9a 100644 --- a/include/defines.inc +++ b/include/defines.inc @@ -50,6 +50,7 @@ KEXC_KERNEL_VER .equ 0x03 KEXC_THREAD_FLAGS .equ 0x04 KEXC_NAME .equ 0x05 KEXC_DESCRIPTION .equ 0x06 +KEXC_RELOCATION_TABLE .equ 0x07 ; Thread flags THREAD_NON_SUSPENDABLE .equ 2 diff --git a/src/00/thread.asm b/src/00/thread.asm index 5b01997..49c6193 100644 --- a/src/00/thread.asm +++ b/src/00/thread.asm @@ -354,6 +354,7 @@ _: pop af cp a ret +.echo "lp: 0x{0:X4}" launchProgram ;; launchProgram [Threading] ;; Loads the specified file into memory as a program and starts a ;; new thread for it. The file must be a valid KEXC executable. @@ -426,12 +427,18 @@ launchProgram: .unknown_ver: ; no minimum version is specified by the executable .no_minimum_ver: +; Check for a relocation table + ld b, KEXC_RELOCATION_TABLE + push ix \ call _getThreadHeader \ pop ix + call z, .relocate + ; Grab header info ld b, KEXC_ENTRY_POINT push ix \ call _getThreadHeader \ pop ix jr nz, .no_entry_point push hl - ld b, KEXC_STACK_SIZE + ; b still has KEXC_ENTRY_POINT, and KEXC_STACK_SIZE is 1 higher + inc b push ix \ call _getThreadHeader \ pop ix ld c, l ; TODO: Error out if H is nonzero? jr z, _ @@ -459,14 +466,14 @@ _: ld a, b pop bc cp a ret -.kernel_too_low: - ld a, errKernelMismatch +.magic_error: + ld a, errNoMagic jr .error .no_entry_point: ld a, errNoEntryPoint jr .error -.magic_error: - ld a, errNoMagic +.kernel_too_low: + ld a, errKernelMismatch jr .error .error_pop2: inc sp \ inc sp @@ -484,6 +491,42 @@ _: or 1 ld a, b pop bc ret +; thrashes de, bc, and hl +.relocate: +; ix = executable address +; hl = program-relative relocation table address + push ix \ pop de + add hl, de +; hl = absolute address of relocation table +.relocation_loop: + ld e, (hl) + inc hl + ld d, (hl) + ; de = first entry in relocation table + dec hl + ; hl: preserved + ld bc, 0 + call cpBCDE + ret z + ; de contains the program-relative address of a program-relative pointer to relocate + ; need to execute, in effect, `add (ix + de), ix` + push ix + add ix, de + push ix \ pop de + pop ix + ; de = absolute address of pointer to relocate + + ; add (de), ix + push ix \ pop bc + ld a, (de) + add a, c + ld (de), a + inc de + ld a, (de) + add a, b + ld (de), a + inc hl \ inc hl + jr .relocation_loop ;; exitThread [Threading] ;; Immediately terminates the running thread. From 19579eb69e73184a7761cefd7c47a1486b5c9271 Mon Sep 17 00:00:00 2001 From: Noam Preil Date: Thu, 30 Jan 2020 13:29:49 -0500 Subject: [PATCH 17/19] Document relocation table --- doc/kexc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/kexc b/doc/kexc index 24ab7f8..3655382 100644 --- a/doc/kexc +++ b/doc/kexc @@ -53,3 +53,9 @@ reserved for kernel use, and 0x80-0xFF is available for arbitrary use. When used to describe an executable program, the only required header is KEXC_ENTRY_POINT (and of course KEXC_HEADER_END). + + Relocation Table + +The relocation table consists of any number of program-relative addresses +terminated by a null word. Those addresses should themselves contain +program-relative pointers to relocate. From 1bed1724ff899f86a64e59df4a2b887633e7af26 Mon Sep 17 00:00:00 2001 From: Noam Preil Date: Thu, 30 Jan 2020 13:33:39 -0500 Subject: [PATCH 18/19] Remove echo that was used for debugging --- src/00/thread.asm | 1 - 1 file changed, 1 deletion(-) diff --git a/src/00/thread.asm b/src/00/thread.asm index 49c6193..572b187 100644 --- a/src/00/thread.asm +++ b/src/00/thread.asm @@ -354,7 +354,6 @@ _: pop af cp a ret -.echo "lp: 0x{0:X4}" launchProgram ;; launchProgram [Threading] ;; Loads the specified file into memory as a program and starts a ;; new thread for it. The file must be a valid KEXC executable. From 54d284d71dfc8122f1edbe6454ad237abb7ebc0f Mon Sep 17 00:00:00 2001 From: Noam Preil Date: Mon, 12 Oct 2020 12:56:34 -0400 Subject: [PATCH 19/19] Relative -> absolute jump --- src/00/thread.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/00/thread.asm b/src/00/thread.asm index 572b187..060a32e 100644 --- a/src/00/thread.asm +++ b/src/00/thread.asm @@ -390,7 +390,7 @@ launchProgram: ; Check magic number ld a, 'K' cp (ix) - jr nz, .magic_error + jp nz, .magic_error ld a, 'E' cp (ix + 1) jr nz, .magic_error