Skip to content

Commit

Permalink
Some minor optimizations to the command line compiler and IDE.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmsc committed Jul 28, 2024
1 parent 07ecd4a commit 4516e8f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/cmdline.bas
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ FileName$ = ""
dim MemStart(-1) byte
' MemEnd: the end of the current file, initialized to MemStart.
MemEnd = Adr(MemStart)
NewPtr = 0
DIM NewPtr

'-------------------------------------
' Shows file error
Expand Down Expand Up @@ -119,7 +119,6 @@ ENDPROC
' Compile file
PROC CompileFile
' Compile main file
poke MemEnd, $9B
? "Compiling..."
dpoke @@RELOC_OFFSET, @BYTECODE_ADDR - MemEnd
dpoke @@BUF_PTR, Adr(MemStart)
Expand Down
3 changes: 1 addition & 2 deletions src/editor.bas
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ ENDPROC
'-------------------------------------
' Compile and run
PROC CompileAndRun
exec ClrTopLine
' Pass the relocation offset, 0 means no
' relocation (compile and run at same address)
dpoke @@RELOC_OFFSET, 0
Expand All @@ -147,7 +146,6 @@ ENDPROC
'-------------------------------------
' Compile to a file
PROC CompileAndSave
exec ClrTopLine
' Pass the relocation offset, the compiled code
' is run at "BYTECODE_ADDR" instead of "MemEnd",
' the output buffer.
Expand All @@ -158,6 +156,7 @@ ENDPROC
'-------------------------------------
' Compile (and run) file
PROC CompileFile
exec ClrTopLine
' Compile main file
? "Parsing: ";
dpoke @@BUF_PTR, Adr(MemStart)
Expand Down

0 comments on commit 4516e8f

Please sign in to comment.