retro/native: drop the old assembly display driver

FossilOrigin-Name: a9901d42927148c479e7903ef38a7db69b899e9ded923c9e2127845e8e4a985d
This commit is contained in:
crc 2019-02-20 18:16:37 +00:00
parent 8ca22d0344
commit 998a3628bb
4 changed files with 121 additions and 945 deletions

View file

@ -37,7 +37,6 @@ section .text
extern main
global loader
global _start
global putchar
global getchar
STACKSIZE equ 0x4000
@ -49,23 +48,9 @@ _start:
mov esp, stack+STACKSIZE
push dword 0
push dword 0
call vClear
call vHome
jmp main
jmp $
align 4
putchar:
mov eax, [esp+4]
cmp eax, -1
jz clearscreen
call vEmit
ret
clearscreen:
call vClear
call vHome
ret
align 4
getchar:
call key
@ -118,805 +103,6 @@ shift:
db 0,'ASDFGHJKL:"~' ;1D-29
db -1,"|ZXCVBNM<>?",-1,"*",0,32,-2 ;2A-3A
section .text
;---------------------------------------------------------------
; This code is based on the video driver for FTS/Forth. Samuel
; Falvo II has kindly granted permission for me to redistribute
; and modify it without restrictions. Thank you Sam!
;---------------------------------------------------------------
; Current VGA text-mode screen location, along with
; some descriptive attributes
video_base: dd 0xB8000
video_width: dd 80
video_height: dd 25
; Current VGA text-mode color attribute.
; NOTE that it's shifted left by 8 bits, ready for
; logical ORing with a character code.
video_attributes: dd 0x0700
; Current VGA cursor position. Also dictates where
; the next character will be displayed via EMIT or
; TYPE. These probably don't need to be 32-bits wide,
; but it's more convenient for asm coding purposes if
; they are.
video_cursorX: dd 0
video_cursorY: dd 0
; I/O ports for the VGA device in question
video_io: dd 0x3D4
;****** vChangeAttributes *************************************
;
; NAME
; vChangeAttributes
;
; SYNOPSIS
; mov eax,andMask
; mov ebx,xorMask
; call vChangeAttributes
; mov [oldAttributes],eax
;
; FUNCTION
; This function can be used to clear, set, replace, or toggle
; all video attributes flags, depending on the settings of
; EAX and EBX. The attribute flags currently defined are as
; follows:
;
; Bit 0-7: Used to force character code bits to 1.
; Bit 8-11: Foreground color
; Bit 12-14: Background color
; Bit 15: Blink flag
; Bit 16-31: Unused -- leave clear.
;
; Note that for normal text output operation, bits 7-0 must be
; left 0.
;
; INPUTS
; EAX This register contains the AND-mask. This mask is
; applied first. Typically used to "zero out" a sub-field
; to be set via EBX.
;
; EBX This register contains the XOR-mask. This mask is
; applied second.
;
; RESULT
; EAX contains the *former* set of attributes.
;
; NOTE
; To query the current attributes without changing them,
; clear EAX and EBX, like this:
;
; xor eax,eax
; xor ebx,ebx
; call vChangeAttributes
; mov [currentAttributes],eax
;
; BUGS
;
; SEE ALSO
;
;**************************************************************
vChangeAttributes:
xchg eax,[video_attributes]
and [video_attributes],eax
xor [video_attributes],ebx
ret
;****** vRethinkCursor ****************************************
;
; NAME
; vRethinkCursor
;
; SYNOPSIS
; call vRethinkCursor
;
; FUNCTION
; Updates the video hardware to relocate the displayed
; text cursor to match expectations of the running environment.
;
; INPUTS
;
; RESULT
;
; BUGS
; This function is undefined if video_cursorX and/or
; video_cursorY is outside the normal addressible bounds
; of the current display.
;
; SEE ALSO
; vCR, vLF, vMoveTo
;
;**************************************************************
vRethinkCursor:
push eax
push ebx
push edx
; Compute offset
; ASSUMES: 0 <= video_cursorX < video_width
; ASSUMES: 0 <= video_cursorY < video_height
mov eax,[video_cursorY]
imul eax,[video_width]
add eax,[video_cursorX]
mov ebx,eax
; Write low offset byte
mov al, 0x0f
mov dx, [video_io]
out dx, al
mov al, bl ;AL = offset low
inc edx ;0x3d5
out dx, al
; Write high offset byte
mov al, 0x0e ;Index reg.: cursor pos (high byte)
dec edx ;0x3d4
out dx, al
mov al, bh ;AL = offset high
inc edx ;0x3d5
out dx, al
pop edx
pop ebx
pop eax
ret
;****** vClear ************************************************
;
; NAME
; vClear
;
; SYNOPSIS
; call vClear
;
; FUNCTION
; Fills the entire screen with space characters, using the
; currently set attribute. The cursor position is NOT
; affected by this call.
;
; INPUTS
;
; RESULT
;
; BUGS
;
; SEE ALSO
; vHome
;
;**************************************************************
vClear:
push eax
push ebx
push ecx
mov eax,[video_base]
mov ebx,[video_height]
imul ebx,[video_width]
mov ecx,[video_attributes]
or ecx,0x20
.more: mov [eax],cx
add eax,2
dec ebx
or ebx,ebx
jnz .more
pop ecx
pop ebx
pop eax
ret
;****** vHome *************************************************
;
; NAME
; vHome
;
; SYNOPSIS
; call vHome
;
; FUNCTION
; Locates the cursor in the upper left-hand corner of the
; display.
;
; INPUTS
;
; RESULT
;
; BUGS
;
; SEE ALSO
; vCR, vLF, vClear
;
;**************************************************************
vHome:
mov [video_cursorY],dword 0
; fall-through to vCR intentional
;****** vCR ***************************************************
;
; NAME
; vCR
;
; SYNOPSIS
; call vCR
;
; FUNCTION
; Performs the glass-tty equivalent of a carriage return.
;
; INPUTS
;
; RESULT
;
; SEE ALSO
; vLF, vHome
;
;**************************************************************
vCR:
mov [video_cursorX],dword 0
jmp vRethinkCursor
;****** vLF ***************************************************
;
; NAME
; vLF
;
; SYNOPSIS
; call vLF
;
; FUNCTION
; Performs the glass-tty equivalent of a line feed. Note
; that the horizontal cursor position is NOT affected by
; this function.
;
; INPUTS
;
; RESULT
;
; BUGS
;
; SEE ALSO
; vHome, vCR
;
;**************************************************************
vLF:
push eax
mov eax,[video_cursorY]
inc eax
cmp eax,[video_height]
jb .scrolling_unnecessary
dec eax
call vScrollUp
.scrolling_unnecessary:
mov [video_cursorY],eax
call vRethinkCursor
pop eax
call vCR
ret
;****** vScrollUp *********************************************
;
; NAME
; vScrollUp
;
; SYNOPSIS
; call vScrollUp
;
; FUNCTION
; Scrolls the whole screen up one line, filling in the bottom
; with spaces in the currently set attribute. This function
; does NOT change the current cursor location.
;
; INPUTS
;
; RESULT
;
; BUGS
;
; SEE ALSO
; vChangeAttributes, vCR, vLF
;
;**************************************************************
vScrollUp:
push eax
push ebx
push ecx
; Scroll the display up one line
xor eax,eax ; Get offset for (0,1)
lea ebx,[eax+1]
call vOffsetAt ; EAX := source
mov ebx,[video_base] ; EBX := destination address
mov ecx,[video_width] ; ECX := number of bytes to move
imul ecx,[video_height]
sub ecx,[video_width]
shl ecx,1
call uMoveDown
; Overwrite the garbage at the bottom.
xor eax,eax
mov ebx,[video_height]
dec ebx
call vOffsetAt
mov ebx,[video_width]
mov ecx,[video_attributes]
or cl,0x20
.more: mov [eax],cx
add eax,2
dec ebx
or ebx,ebx
jnz .more
pop ecx
pop ebx
pop eax
ret
;****** vOffsetAt *********************************************
;
; NAME
; vOffsetAt
;
; SYNOPSIS
; mov eax,Xcoord
; mov ebx,Ycoord
; call vOffsetAt
; mov [memLocation],eax
;
; FUNCTION
; Given an X and Y coordinate on the display (with the upper-
; left-hand corner set to (0,0)), return a memory address
; with which a character and attribute pair can be stored.
;
; INPUTS
; EAX The horizontal coordinate
; EBX The vertical coordinate
;
; RESULT
; Byte address of the corresponding character in the video
; frame buffer.
;
; BUGS
; Strange things happen if the X or Y coordinate are out of
; bounds for the current VGA frame buffer size.
;
; SEE ALSO
;
;**************************************************************
vOffsetAt:
push ebx
imul ebx,[video_width]
add eax,ebx
shl eax,1
add eax,[video_base]
pop ebx
ret
;****** vEmit *************************************************
;
; NAME
; vEmit
;
; SYNOPSIS
; mov al,charToEmit
; call vEmit
;
; FUNCTION
; Displays the character in al to the screen at the current
; cursor position. This function DOES interpret the following
; control codes:
;
; $08 Backspace -- moves cursor to the left one position
; $09 Tab -- moves cursor to next tab stop (every 8 chars)
; $0A Line feed -- advances cursor down one line
; $0C Form feed -- clears the screen and homes the cursor
; $0D Carriage Return -- Restores cursor to column 0
;
; INPUTS
; AL Character to emit to the display
;
; RESULT
;
; BUGS
;
; SEE ALSO
; vRawEmit
;
;**************************************************************
vEmit:
cmp al,0x08
jz vBS
cmp al,0x09
jz vTAB
cmp al,0x0A
jz vLF
cmp al,0x0C
jz vFF
cmp al,0x0D
jz vCR
; flow-through to vRawEmit is intentional.
;****** vRawEmit **********************************************
;
; NAME
; vRawEmit
;
; SYNOPSIS
; mov al,charToEmit
; call vRawEmit
;
; FUNCTION
; Displays the character in al to the screen at the current
; cursor position. This function DOES NOT interpret any
; control codes.
;
; INPUTS
; AL Character to emit to the display
;
; RESULT
;
; BUGS
;
; SEE ALSO
; vEmit
;
;**************************************************************
vRawEmit:
push eax
push ebx
push ecx
and eax,0x000000FF
or eax,[video_attributes]
mov ecx,eax
mov eax,[video_cursorX]
mov ebx,[video_cursorY]
call vOffsetAt
mov [eax],cx
pop ecx
pop ebx
pop eax
; fall-through to vBumpCursor is intentional.
;****** vBumpCursor *******************************************
;
; NAME
; vBumpCursor
;
; SYNOPSIS
; call vBumpCursor
;
; FUNCTION
; Advances the cursor one character to the right.
; If wrap-around occurs, it will further drop the cursor
; down one line, if possible. If not, the screen is
; scrolled.
;
; INPUTS
;
; RESULT
;
; BUGS
;
; SEE ALSO
; vEmit, vRawEmit, vLF, vCR
;
;**************************************************************
vBumpCursor:
push eax
mov eax,[video_cursorX]
inc eax
cmp eax,[video_width]
jnb .wrapAround
mov [video_cursorX],eax
pop eax
jmp vRethinkCursor
.wrapAround:
pop eax
call vCR
jmp vLF
;****** vType *************************************************
;
; NAME
; vType
;
; SYNOPSIS
; mov eax,msgBuffer
; mov ebx,msgLength
; call vType
;
; FUNCTION
; Displays the text stored in msgBuffer, consisting of msgLength
; bytes. It is safe to type a buffer of zero bytes.
;
; INPUTS
; EAX Pointer to the buffer to display
; EBX Length of the buffer. If 0, no text is displayed.
;
; RESULT
;
; BUGS
;
; SEE ALSO
; vEmit, vRawEmit
;
;**************************************************************
vType:
push eax
push ebx
push ecx
mov ecx,eax
.again: or ebx,ebx
jz .done
mov al,[ecx]
inc ecx
call vEmit
dec ebx
jmp .again
.done: pop ecx
pop ebx
pop eax
ret
;****** vBS ***************************************************
;
; NAME
; vBS
;
; SYNOPSIS
; call vBS
;
; FUNCTION
; Emulates the glass-tty equivalent of a backspace on a
; teletype by moving the cursor to the left, if possible.
;
; INPUTS
;
; RESULT
;
; BUGS
;
; SEE ALSO
; vTAB
;
;**************************************************************
vBS: push eax
call vRawBS
mov al,' '
call vEmit
pop eax
; fall-through to vBumpCursor is intentional.
vRawBS: push eax
mov eax,[video_cursorX]
or eax,eax
jz .asFarAsItllGo
dec eax
mov [video_cursorX],eax
call vRethinkCursor
.asFarAsItllGo:
pop eax
ret
;****** vTAB **************************************************
;
; NAME
; vTAB
;
; SYNOPSIS
; call vTAB
;
; FUNCTION
; Advances the cursor to the next tabstop, which is currently
; every 8 characters.
;
; INPUTS
;
; RESULT
;
; BUGS
;
; SEE ALSO
; vBS, vCR, vLF
;
;**************************************************************
vTAB: push eax
mov eax,[video_cursorX]
and eax,7
jz .moveAnother8
.oneMoreSpace:
mov al,0x20
call vEmit
mov eax,[video_cursorX]
and eax,7
jnz .oneMoreSpace
pop eax
ret
.moveAnother8:
mov al,0x20
call vEmit
call vEmit
call vEmit
call vEmit
call vEmit
call vEmit
call vEmit
call vEmit
pop eax
ret
;****** vPage / vFF *******************************************
;
; NAME
; vPage
;
; AKA
; vFF
;
; SYNOPSIS
; call vPage ; or...
; call vFF
;
; FUNCTION
; Clears the screen and homes the cursor, thus emulating
; a form-feed operation on a teletype (hence the name; it
; delivers a "new page").
;
; INPUTS
;
; RESULT
;
; BUGS
;
; SEE ALSO
; vTAB, vCR, vLF, vEmit
;
;**************************************************************
vPage:
vFF:
call vClear
jmp vHome
;****** uMoveDown *********************************************
;
; NAME
; uMoveDown
;
; SYNOPSIS
; mov eax,srcAddress
; mov ebx,dstAddress
; mov ecx,nbrOfBytes
; call uMoveDown
;
; FUNCTION
; Moves ECX bytes from EBX to EAX. This move is assumed
; correct if and only if EBX <= EAX. Otherwise, memory
; is filled with a repeating pattern.
;
; INPUTS
; EAX source address
; EBX destination address
; ECX number of bytes to move
;
; RESULT
;
; BUGS
;
; SEE ALSO
; uMoveUp, uMove
;
;**************************************************************
uMoveDown:
push eax
push ebx
push ecx
push edx
cmp ecx,4
jb .no32bits
.more32bits:
mov edx,[eax]
add eax,4
mov [ebx],edx
add ebx,4
sub ecx,4
cmp ecx,4
jae .more32bits
.no32bits:
cmp ecx,2
jb .no16bits
.more16bits:
mov dx,[eax]
add eax,2
mov [ebx],dx
add ebx,2
sub ecx,2
cmp ecx,2
jae .more16bits
.no16bits:
or ecx,ecx
jz .done
.morebytes:
mov dl,[eax]
inc eax
mov [ebx],dl
inc ebx
dec ecx
or eax,eax
jnz .morebytes
.done:
pop edx
pop ecx
pop ebx
pop eax
ret
section .bss
align 4

View file

@ -1,6 +1,6 @@
#include <stdint.h>
int32_t ngaImageCells = 54397;
int32_t ngaImage[] = { 1793,12774,54376,54396,201906,0,10,1,10,2,10,3,10,4,10,5,10,6,10,
int32_t ngaImageCells = 54399;
int32_t ngaImage[] = { 1793,12774,54378,54398,201906,0,10,1,10,2,10,3,10,4,10,5,10,6,10,
7,10,8,10,9,10,10,10,11,10,12,10,13,10,14,10,15,10,16,10,
17,10,18,10,19,10,20,10,21,10,22,10,23,10,24,10,25,10,26,10,
68223234,1,2575,85000450,1,656912,355,339,268505089,66,65,135205121,66,10,101384453,0,9,10,2049,59,
@ -17,7 +17,7 @@ int32_t ngaImage[] = { 1793,12774,54376,54396,201906,0,10,1,10,2,10,3,10,4,10,5,
-1,127,10,2049,200,2049,161,459023,134,285282049,3,2,16846593,127,-1,127,134283536,1793,108,16846593,
3,0,108,8,659201,3,524545,25,113,17043201,3,7,2049,113,2049,108,268505092,127,1642241,127,
656131,659201,3,524545,7,113,2049,108,459009,19,113,459009,55,113,459009,15,113,459009,17,113,
1793,12828,10,524546,161,134284303,163,1807,1025,1642241,230,285282049,347,1,459012,342,117509889,180,342,134287105,
1793,12830,10,524546,161,134284303,163,1807,1025,1642241,230,285282049,347,1,459012,342,117509889,180,342,134287105,
347,200,16845825,0,355,339,1793,67,17826050,347,250,8,117506305,348,358,67,0,9,153,100,
117,112,0,375,11,153,100,114,111,112,0,382,13,153,115,119,97,112,0,390,
21,153,99,97,108,108,0,398,27,153,101,113,63,0,406,29,153,45,101,113,
@ -159,7 +159,7 @@ int32_t ngaImage[] = { 1793,12774,54376,54396,201906,0,10,1,10,2,10,3,10,4,10,5,
2065,10,1,3112,2049,2065,4,16,10,3093,3146,147,118,58,117,112,100,97,116,101,
45,117,115,105,110,103,0,4,1793,3153,15,4,8,10,1,3149,2049,2077,16,10,
3128,3167,147,99,111,112,121,0,1793,3176,1,59,2049,2065,2049,62,10,1,3169,2049,
2252,3,3,10,3159,3196,147,83,99,111,112,101,76,105,115,116,0,53041,53156,10,
2252,3,3,10,3159,3196,147,83,99,111,112,101,76,105,115,116,0,53043,53158,10,
3183,3205,147,123,123,0,2049,1570,2,1,3196,2049,62,16,10,3199,3230,147,45,45,
45,114,101,118,101,97,108,45,45,45,0,2049,1570,1,3196,2049,2908,16,10,3214,
3244,147,125,125,0,1,3196,2049,59,4,15,11,1793,3258,3841,3196,4097,2,10,1,
@ -638,15 +638,15 @@ int32_t ngaImage[] = { 1793,12774,54376,54396,201906,0,10,1,10,2,10,3,10,4,10,5,
3790,10,1,12676,2049,3499,10,12660,12715,147,115,58,103,101,116,0,1793,12759,1,1025,
2049,3475,1793,12750,2049,12654,2,2049,3383,2049,12613,1793,12736,1,13,11,10,1,12732,1793,
12744,1,10,11,10,1,12740,2049,2092,22,10,1,12723,2049,2223,2049,3349,2049,3790,10,
1,12717,2049,3499,10,12706,12774,147,108,105,115,116,101,110,0,2049,12531,2049,3697,82,
69,84,82,79,47,78,97,116,105,118,101,0,1,12778,2049,8950,2049,8924,3841,4,
1,100,20,2049,8964,1,46,2049,8900,2049,8964,2049,8913,2049,12674,2049,12595,1,367,1,
11,2049,67,1,12812,7,10,1793,12858,1,63,2049,8900,2049,8924,2049,3697,119,111,114,
100,32,110,111,116,32,102,111,117,110,100,0,1,12836,2049,8950,2049,8913,10,1,
12828,12764,32,134,66,76,79,67,75,83,0,12860,12886,134,67,117,114,114,101,110,
116,66,108,111,99,107,0,0,12870,12902,134,67,117,114,114,101,110,116,76,105,
110,101,0,0,12887,12917,134,67,117,114,114,101,110,116,67,111,108,0,0,12903,
12927,134,66,108,111,99,107,0,0,0,0,0,0,0,0,0,0,0,0,0,
1,12717,2049,3499,10,12706,12774,147,108,105,115,116,101,110,0,2049,12531,2049,12477,2049,
3697,82,69,84,82,79,47,78,97,116,105,118,101,0,1,12780,2049,8950,2049,8924,
3841,4,1,100,20,2049,8964,1,46,2049,8900,2049,8964,2049,8913,2049,12674,2049,12595,1,
367,1,11,2049,67,1,12814,7,10,1793,12860,1,63,2049,8900,2049,8924,2049,3697,119,
111,114,100,32,110,111,116,32,102,111,117,110,100,0,1,12838,2049,8950,2049,8913,
10,1,12830,12764,32,134,66,76,79,67,75,83,0,12862,12888,134,67,117,114,114,
101,110,116,66,108,111,99,107,0,0,12872,12904,134,67,117,114,114,101,110,116,
76,105,110,101,0,0,12889,12919,134,67,117,114,114,101,110,116,67,111,108,0,
0,12905,12929,134,66,108,111,99,107,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@ -697,8 +697,8 @@ int32_t ngaImage[] = { 1793,12774,54376,54396,201906,0,10,1,10,2,10,3,10,4,10,5,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,12918,13962,134,66,108,111,99,
107,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12920,13964,134,66,108,
111,99,107,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@ -2336,7 +2336,7 @@ int32_t ngaImage[] = { 1793,12774,54376,54396,201906,0,10,1,10,2,10,3,10,4,10,5,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,13952,46737,134,84,79,66,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,13954,46739,134,84,79,66,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@ -2362,56 +2362,56 @@ int32_t ngaImage[] = { 1793,12774,54376,54396,201906,0,10,1,10,2,10,3,10,4,10,5,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,46730,47271,147,98,108,111,99,107,115,
58,105,110,105,116,105,97,108,105,122,101,0,1,13962,1,1024,1,32,19,1793,
47287,1,32,67502597,16,2049,2908,10,1,47280,2049,2252,3,10,47250,47308,147,98,108,111,
99,107,58,119,114,105,116,101,0,10,47293,47323,147,98,108,111,99,107,58,114,
101,97,100,0,10,47309,47341,147,99,117,114,114,101,110,116,45,98,108,111,99,
107,0,3841,12886,1,1024,19,1,13962,17,10,47324,47358,147,110,101,120,116,0,1793,
47363,2049,2908,10,1,47360,2049,2118,10,47350,47376,147,99,111,112,121,0,2049,2055,15,
4,16,10,47309,47398,147,98,108,111,99,107,58,115,101,108,101,99,116,0,4097,
12886,1793,47423,1,12927,2049,3475,2049,47341,1,1024,1793,47417,2049,59,2049,3383,10,1,47412,
2049,2252,3,10,1,47402,2049,3499,10,47382,47444,147,98,108,111,99,107,58,117,112,
100,97,116,101,0,2049,47341,1,12927,1,1024,1793,47457,2049,47376,2049,47358,10,1,47452,
2049,2252,771,10,47428,47476,147,116,116,121,58,99,108,101,97,114,0,2049,12477,10,
47463,47489,147,99,117,114,115,111,114,0,4,2049,10147,10,47479,47507,147,105,110,100,
105,99,97,116,111,114,115,0,3841,12917,1,3,17,1,0,2049,47489,1,35,2049,
8900,1,1,3841,12902,1,1,17,2049,47489,1,35,2049,8900,1,1,1,24,2049,47489,
10,47493,47549,147,114,117,108,101,114,0,2049,3697,32,32,32,48,45,45,45,45,
45,45,45,45,45,49,45,45,45,45,45,45,45,45,45,50,45,45,45,45,
45,45,45,45,45,51,0,1,47551,2049,8950,2049,3697,45,45,45,45,45,45,45,
45,45,52,45,45,45,45,45,45,45,45,45,53,45,45,45,45,45,45,45,
45,45,54,45,45,45,0,1,47592,2049,8950,2049,8913,10,47540,47643,147,98,108,111,
99,107,35,0,1,35,2049,8900,3841,12886,2049,8964,10,47633,47659,147,112,111,115,0,
3841,12902,2049,8964,1,58,2049,8900,3841,12917,2049,8964,10,47652,47682,147,115,116,97,116,
117,115,0,2049,47643,2049,8924,2049,47659,2049,3697,32,58,58,32,0,1,47690,2049,8950,
2049,9030,10,47672,47712,147,102,111,114,109,97,116,0,2049,3697,32,124,32,0,1,
47714,2049,8950,8,2049,3697,32,124,0,1,47725,2049,8950,2049,8913,10,47702,47743,147,108,
105,110,101,0,1793,47759,1,64,1793,47754,2049,59,2049,8900,10,1,47749,2049,2252,10,
1,47745,2049,47712,10,47735,47772,147,99,111,100,101,0,1,12927,1,16,1793,47781,2049,
47743,10,1,47778,2049,8706,3,10,47764,47797,147,102,111,114,109,97,116,0,2049,3697,
32,124,32,0,1,47799,2049,8950,8,2049,3697,32,124,0,1,47810,2049,8950,2049,8913,
10,47787,47827,147,116,111,98,0,1,46737,1,4,1793,47836,2049,47743,10,1,47833,2049,
2252,3,10,47463,47859,147,98,108,111,99,107,58,100,105,115,112,108,97,121,0,
2049,47476,2049,47549,2049,47772,2049,47549,2049,47827,2049,47549,2049,47507,2049,47682,10,47842,47885,134,
84,78,101,120,116,0,0,47876,47897,147,115,99,114,111,108,108,63,0,3841,47885,
1,256,14,10,47886,47916,147,115,99,114,111,108,108,45,117,112,0,1,46737,1,
64,17,1,46737,1,193,2049,3167,1,193,4097,47885,1,46737,1,193,17,1,64,1793,
47947,1,32,67502597,16,2049,2908,10,1,47940,2049,2252,3,10,47842,47967,147,99,58,112,
117,116,60,84,79,66,62,0,2,1,10,11,1793,47987,3,3841,47885,1,64,17,
2,1,64,788,18,4097,47885,10,1,47973,1793,48002,3841,47885,1,46737,17,16,1,47885,
2049,3009,10,1,47991,2049,67,2049,47897,1793,48013,2049,47916,10,1,48010,9,10,47953,48029,
147,119,105,116,104,45,116,111,98,0,1,47967,1,8900,2049,8764,8,1,8900,2049,
8778,10,48017,48059,147,116,111,98,58,105,110,105,116,105,97,108,105,122,101,0,
1,46737,1,512,1793,48072,1,32,67502597,16,2049,2908,10,1,48065,2049,2252,3,1,0,
4097,47885,10,48041,48092,147,99,117,114,115,111,114,0,10,48082,48104,147,104,97,110,
100,108,101,114,0,2049,12654,2049,3697,101,100,105,116,111,114,58,107,101,121,60,
32,62,0,1,48108,1793,48131,1,11,17,16,10,1,48126,2049,2077,2049,200,2,2049,
2583,1793,48147,2049,161,15,8,10,1,48142,1793,48153,3,10,1,48151,2049,67,10,48041,
48173,134,68,111,110,101,69,100,105,116,105,110,103,0,0,48158,48182,147,101,100,
105,116,0,2049,2440,4097,48173,2049,48059,2049,47271,2049,47323,1,0,2049,47398,1793,48207,2049,
47859,2049,48092,2049,48104,3841,48173,10,1,48198,2049,2223,10,48174,48222,134,84,111,107,101,
110,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,46732,47273,147,98,108,111,99,
107,115,58,105,110,105,116,105,97,108,105,122,101,0,1,13964,1,1024,1,32,
19,1793,47289,1,32,67502597,16,2049,2908,10,1,47282,2049,2252,3,10,47252,47310,147,98,
108,111,99,107,58,119,114,105,116,101,0,10,47295,47325,147,98,108,111,99,107,
58,114,101,97,100,0,10,47311,47343,147,99,117,114,114,101,110,116,45,98,108,
111,99,107,0,3841,12888,1,1024,19,1,13964,17,10,47326,47360,147,110,101,120,116,
0,1793,47365,2049,2908,10,1,47362,2049,2118,10,47352,47378,147,99,111,112,121,0,2049,
2055,15,4,16,10,47311,47400,147,98,108,111,99,107,58,115,101,108,101,99,116,
0,4097,12888,1793,47425,1,12929,2049,3475,2049,47343,1,1024,1793,47419,2049,59,2049,3383,10,
1,47414,2049,2252,3,10,1,47404,2049,3499,10,47384,47446,147,98,108,111,99,107,58,
117,112,100,97,116,101,0,2049,47343,1,12929,1,1024,1793,47459,2049,47378,2049,47360,10,
1,47454,2049,2252,771,10,47430,47478,147,116,116,121,58,99,108,101,97,114,0,2049,
12477,10,47465,47491,147,99,117,114,115,111,114,0,4,2049,10147,10,47481,47509,147,105,
110,100,105,99,97,116,111,114,115,0,3841,12919,1,3,17,1,0,2049,47491,1,
35,2049,8900,1,1,3841,12904,1,1,17,2049,47491,1,35,2049,8900,1,1,1,24,
2049,47491,10,47495,47551,147,114,117,108,101,114,0,2049,3697,32,32,32,48,45,45,
45,45,45,45,45,45,45,49,45,45,45,45,45,45,45,45,45,50,45,45,
45,45,45,45,45,45,45,51,0,1,47553,2049,8950,2049,3697,45,45,45,45,45,
45,45,45,45,52,45,45,45,45,45,45,45,45,45,53,45,45,45,45,45,
45,45,45,45,54,45,45,45,0,1,47594,2049,8950,2049,8913,10,47542,47645,147,98,
108,111,99,107,35,0,1,35,2049,8900,3841,12888,2049,8964,10,47635,47661,147,112,111,
115,0,3841,12904,2049,8964,1,58,2049,8900,3841,12919,2049,8964,10,47654,47684,147,115,116,
97,116,117,115,0,2049,47645,2049,8924,2049,47661,2049,3697,32,58,58,32,0,1,47692,
2049,8950,2049,9030,10,47674,47714,147,102,111,114,109,97,116,0,2049,3697,32,124,32,
0,1,47716,2049,8950,8,2049,3697,32,124,0,1,47727,2049,8950,2049,8913,10,47704,47745,
147,108,105,110,101,0,1793,47761,1,64,1793,47756,2049,59,2049,8900,10,1,47751,2049,
2252,10,1,47747,2049,47714,10,47737,47774,147,99,111,100,101,0,1,12929,1,16,1793,
47783,2049,47745,10,1,47780,2049,8706,3,10,47766,47799,147,102,111,114,109,97,116,0,
2049,3697,32,124,32,0,1,47801,2049,8950,8,2049,3697,32,124,0,1,47812,2049,8950,
2049,8913,10,47789,47829,147,116,111,98,0,1,46739,1,4,1793,47838,2049,47745,10,1,
47835,2049,2252,3,10,47465,47861,147,98,108,111,99,107,58,100,105,115,112,108,97,
121,0,2049,47478,2049,47551,2049,47774,2049,47551,2049,47829,2049,47551,2049,47509,2049,47684,10,47844,
47887,134,84,78,101,120,116,0,0,47878,47899,147,115,99,114,111,108,108,63,0,
3841,47887,1,256,14,10,47888,47918,147,115,99,114,111,108,108,45,117,112,0,1,
46739,1,64,17,1,46739,1,193,2049,3167,1,193,4097,47887,1,46739,1,193,17,1,
64,1793,47949,1,32,67502597,16,2049,2908,10,1,47942,2049,2252,3,10,47844,47969,147,99,
58,112,117,116,60,84,79,66,62,0,2,1,10,11,1793,47989,3,3841,47887,1,
64,17,2,1,64,788,18,4097,47887,10,1,47975,1793,48004,3841,47887,1,46739,17,16,
1,47887,2049,3009,10,1,47993,2049,67,2049,47899,1793,48015,2049,47918,10,1,48012,9,10,
47955,48031,147,119,105,116,104,45,116,111,98,0,1,47969,1,8900,2049,8764,8,1,
8900,2049,8778,10,48019,48061,147,116,111,98,58,105,110,105,116,105,97,108,105,122,
101,0,1,46739,1,512,1793,48074,1,32,67502597,16,2049,2908,10,1,48067,2049,2252,3,
1,0,4097,47887,10,48043,48094,147,99,117,114,115,111,114,0,10,48084,48106,147,104,
97,110,100,108,101,114,0,2049,12654,2049,3697,101,100,105,116,111,114,58,107,101,
121,60,32,62,0,1,48110,1793,48133,1,11,17,16,10,1,48128,2049,2077,2049,200,
2,2049,2583,1793,48149,2049,161,15,8,10,1,48144,1793,48155,3,10,1,48153,2049,67,
10,48043,48175,134,68,111,110,101,69,100,105,116,105,110,103,0,0,48160,48184,147,
101,100,105,116,0,2049,2440,4097,48175,2049,48061,2049,47273,2049,47325,1,0,2049,47400,1793,
48209,2049,47861,2049,48094,2049,48106,3841,48175,10,1,48200,2049,2223,10,48176,48224,134,84,111,
107,101,110,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@ -2616,49 +2616,49 @@ int32_t ngaImage[] = { 1793,12774,54376,54396,201906,0,10,1,10,2,10,3,10,4,10,5,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
48212,52330,147,112,114,101,112,97,114,101,0,1,48222,1,4096,1793,52343,1,0,67502597,
16,2049,2908,10,1,52336,2049,2252,3,10,52319,52361,147,103,101,110,101,114,97,116,
101,0,1,48222,4097,3,1,12927,1,32,2049,6354,10,52349,52380,147,105,116,101,109,
0,2,2049,82,2049,2567,1793,52389,3,10,1,52387,1793,52396,2049,367,10,1,52393,2049,
67,10,52372,52412,147,112,114,111,99,101,115,115,0,1793,52417,2049,52380,10,1,52414,
2049,7207,10,48174,52439,147,101,100,105,116,111,114,58,107,101,121,60,49,62,0,
1793,52457,2049,52330,1,3,1793,52450,2049,52361,10,1,52447,2049,3107,2049,52412,10,1,52441,
2049,48029,10,52422,52476,147,98,111,117,110,100,97,114,105,101,115,0,1,12902,1,
0,1,15,2049,3041,1,12917,1,0,1,63,2049,3041,10,52462,52510,147,107,101,101,
112,45,105,110,45,114,97,110,103,101,0,1,0,1,32,2049,2921,2049,2891,10,
52422,52536,147,101,100,105,116,111,114,58,107,101,121,60,72,62,0,2049,47444,3841,
12886,2049,2921,2049,52510,2049,47398,2049,47476,10,52519,52566,147,101,100,105,116,111,114,58,
107,101,121,60,83,62,0,2049,47444,3841,12886,2049,2908,2049,52510,2049,47398,2049,47476,10,
52549,52596,147,101,100,105,116,111,114,58,107,101,121,60,110,62,0,1,12902,2049,
3024,2049,52476,10,52579,52620,147,101,100,105,116,111,114,58,107,101,121,60,104,62,
0,1,12917,2049,3024,2049,52476,10,52603,52644,147,101,100,105,116,111,114,58,107,101,
121,60,115,62,0,1,12917,2049,3009,2049,52476,10,52627,52668,147,101,100,105,116,111,
114,58,107,101,121,60,116,62,0,1,12902,2049,3009,2049,52476,10,52651,52684,147,108,
105,109,105,116,0,1,12927,2,1,1024,17,2049,2891,10,52675,52708,147,102,101,116,
99,104,45,112,114,105,111,114,0,1793,52713,2049,2921,10,1,52710,1793,52719,15,10,
1,52717,2049,2092,10,52693,52742,147,102,105,110,100,45,110,101,120,116,45,119,111,
114,100,0,3841,12902,1,64,19,3841,12917,17,1,12927,17,2049,2908,2049,59,1,32,
12,1,0,3,1,52755,7,10,52724,52786,147,102,105,110,100,45,112,114,105,111,
114,45,119,111,114,100,0,3841,12902,1,64,19,3841,12917,17,1,12927,17,2049,2921,
2049,52708,1,32,12,1,0,3,1,52799,7,10,52767,52826,147,115,101,108,101,99,
116,45,110,101,120,116,0,2049,52742,2049,2921,2049,52684,1,12927,18,1,64,20,4097,
12902,4097,12917,10,52811,52859,147,115,101,108,101,99,116,45,112,114,105,111,114,0,
2049,52786,2049,2908,2049,52684,1,12927,18,1,64,20,4097,12902,4097,12917,10,52651,52893,147,
101,100,105,116,111,114,58,107,101,121,60,99,62,0,2049,52859,10,52876,52913,147,
101,100,105,116,111,114,58,107,101,121,60,114,62,0,2049,52826,10,52896,52924,147,
100,101,115,116,0,3841,12902,1,64,19,3841,12917,17,1,12927,17,10,52916,52945,147,
99,104,97,114,115,0,67502597,2049,82,10,52936,52957,147,99,111,112,121,0,1793,52971,
2049,2055,1,35,2049,2065,16,1,2908,2049,2118,10,1,52959,2049,2252,10,52896,52993,147,
101,100,105,116,111,114,58,107,101,121,60,97,62,0,2049,12715,2049,52924,2049,52945,
2049,52957,771,2049,47476,10,52976,53022,147,101,100,105,116,111,114,58,107,101,121,60,
120,62,0,1,12927,1,1024,1793,53035,1,32,67502597,16,2049,2908,10,1,53028,2049,2252,
3,10,53005,53058,147,101,100,105,116,111,114,58,107,101,121,60,122,62,0,1,
12927,3841,12902,1,64,19,17,1,64,1793,53077,1,32,67502597,16,2049,2908,10,1,53070,
2049,2252,3,10,53041,53091,134,67,111,112,121,0,0,0,0,0,0,0,0,0,
0,0,48214,52332,147,112,114,101,112,97,114,101,0,1,48224,1,4096,1793,52345,1,
0,67502597,16,2049,2908,10,1,52338,2049,2252,3,10,52321,52363,147,103,101,110,101,114,
97,116,101,0,1,48224,4097,3,1,12929,1,32,2049,6354,10,52351,52382,147,105,116,
101,109,0,2,2049,82,2049,2567,1793,52391,3,10,1,52389,1793,52398,2049,367,10,1,
52395,2049,67,10,52374,52414,147,112,114,111,99,101,115,115,0,1793,52419,2049,52382,10,
1,52416,2049,7207,10,48176,52441,147,101,100,105,116,111,114,58,107,101,121,60,49,
62,0,1793,52459,2049,52332,1,3,1793,52452,2049,52363,10,1,52449,2049,3107,2049,52414,10,
1,52443,2049,48031,10,52424,52478,147,98,111,117,110,100,97,114,105,101,115,0,1,
12904,1,0,1,15,2049,3041,1,12919,1,0,1,63,2049,3041,10,52464,52512,147,107,
101,101,112,45,105,110,45,114,97,110,103,101,0,1,0,1,32,2049,2921,2049,
2891,10,52424,52538,147,101,100,105,116,111,114,58,107,101,121,60,72,62,0,2049,
47446,3841,12888,2049,2921,2049,52512,2049,47400,2049,47478,10,52521,52568,147,101,100,105,116,111,
114,58,107,101,121,60,83,62,0,2049,47446,3841,12888,2049,2908,2049,52512,2049,47400,2049,
47478,10,52551,52598,147,101,100,105,116,111,114,58,107,101,121,60,110,62,0,1,
12904,2049,3024,2049,52478,10,52581,52622,147,101,100,105,116,111,114,58,107,101,121,60,
104,62,0,1,12919,2049,3024,2049,52478,10,52605,52646,147,101,100,105,116,111,114,58,
107,101,121,60,115,62,0,1,12919,2049,3009,2049,52478,10,52629,52670,147,101,100,105,
116,111,114,58,107,101,121,60,116,62,0,1,12904,2049,3009,2049,52478,10,52653,52686,
147,108,105,109,105,116,0,1,12929,2,1,1024,17,2049,2891,10,52677,52710,147,102,
101,116,99,104,45,112,114,105,111,114,0,1793,52715,2049,2921,10,1,52712,1793,52721,
15,10,1,52719,2049,2092,10,52695,52744,147,102,105,110,100,45,110,101,120,116,45,
119,111,114,100,0,3841,12904,1,64,19,3841,12919,17,1,12929,17,2049,2908,2049,59,
1,32,12,1,0,3,1,52757,7,10,52726,52788,147,102,105,110,100,45,112,114,
105,111,114,45,119,111,114,100,0,3841,12904,1,64,19,3841,12919,17,1,12929,17,
2049,2921,2049,52710,1,32,12,1,0,3,1,52801,7,10,52769,52828,147,115,101,108,
101,99,116,45,110,101,120,116,0,2049,52744,2049,2921,2049,52686,1,12929,18,1,64,
20,4097,12904,4097,12919,10,52813,52861,147,115,101,108,101,99,116,45,112,114,105,111,
114,0,2049,52788,2049,2908,2049,52686,1,12929,18,1,64,20,4097,12904,4097,12919,10,52653,
52895,147,101,100,105,116,111,114,58,107,101,121,60,99,62,0,2049,52861,10,52878,
52915,147,101,100,105,116,111,114,58,107,101,121,60,114,62,0,2049,52828,10,52898,
52926,147,100,101,115,116,0,3841,12904,1,64,19,3841,12919,17,1,12929,17,10,52918,
52947,147,99,104,97,114,115,0,67502597,2049,82,10,52938,52959,147,99,111,112,121,0,
1793,52973,2049,2055,1,35,2049,2065,16,1,2908,2049,2118,10,1,52961,2049,2252,10,52898,
52995,147,101,100,105,116,111,114,58,107,101,121,60,97,62,0,2049,12715,2049,52926,
2049,52947,2049,52959,771,2049,47478,10,52978,53024,147,101,100,105,116,111,114,58,107,101,
121,60,120,62,0,1,12929,1,1024,1793,53037,1,32,67502597,16,2049,2908,10,1,53030,
2049,2252,3,10,53007,53060,147,101,100,105,116,111,114,58,107,101,121,60,122,62,
0,1,12929,3841,12904,1,64,19,17,1,64,1793,53079,1,32,67502597,16,2049,2908,10,
1,53072,2049,2252,3,10,53043,53093,134,67,111,112,121,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,53083,53169,134,
67,111,112,121,66,108,111,99,107,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,53085,
53171,134,67,111,112,121,66,108,111,99,107,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
@ -2709,14 +2709,14 @@ int32_t ngaImage[] = { 1793,12774,54376,54396,201906,0,10,1,10,2,10,3,10,4,10,5,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,53041,54211,147,101,100,
105,116,111,114,58,107,101,121,60,98,62,0,1,12927,3841,12902,1,64,19,17,
1,53091,1,64,2049,3167,10,54194,54243,147,101,100,105,116,111,114,58,107,101,121,
60,109,62,0,1,53091,1,12927,3841,12902,1,64,19,17,1,64,2049,3167,10,54226,
54275,147,101,100,105,116,111,114,58,107,101,121,60,66,62,0,1,12927,1,53169,
1,1024,2049,3167,10,54258,54301,147,101,100,105,116,111,114,58,107,101,121,60,77,
62,0,1,53169,1,12927,1,1024,2049,3167,10,54284,54327,147,101,100,105,116,111,114,
58,107,101,121,60,105,62,0,2049,47444,2049,47308,10,54310,54349,147,101,100,105,116,
111,114,58,107,101,121,60,121,62,0,3841,12886,2049,47398,10,54332,54371,147,101,100,
105,116,111,114,58,107,101,121,60,113,62,0,2049,2428,4097,48173,10,54354,54393,147,
101,100,105,116,111,114,58,107,101,121,60,96,62,0,2049,48059,10,0 };
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,53043,54213,147,
101,100,105,116,111,114,58,107,101,121,60,98,62,0,1,12929,3841,12904,1,64,
19,17,1,53093,1,64,2049,3167,10,54196,54245,147,101,100,105,116,111,114,58,107,
101,121,60,109,62,0,1,53093,1,12929,3841,12904,1,64,19,17,1,64,2049,3167,
10,54228,54277,147,101,100,105,116,111,114,58,107,101,121,60,66,62,0,1,12929,
1,53171,1,1024,2049,3167,10,54260,54303,147,101,100,105,116,111,114,58,107,101,121,
60,77,62,0,1,53171,1,12929,1,1024,2049,3167,10,54286,54329,147,101,100,105,116,
111,114,58,107,101,121,60,105,62,0,2049,47446,2049,47310,10,54312,54351,147,101,100,
105,116,111,114,58,107,101,121,60,121,62,0,3841,12888,2049,47400,10,54334,54373,147,
101,100,105,116,111,114,58,107,101,121,60,113,62,0,2049,2428,4097,48175,10,54356,
54395,147,101,100,105,116,111,114,58,107,101,121,60,96,62,0,2049,48061,10,0 };

View file

@ -154,15 +154,6 @@ void ngaProcessPackedOpcodes(CELL opcode);
int ngaValidatePackedOpcodes(CELL opcode);
/*---------------------------------------------------------------------
Here's an output helper. I define a wrapper over `write` to avoid
using `printf()`.
---------------------------------------------------------------------*/
void retro_puts(char *s) {
while (*s) putchar(*s++);
}
/*---------------------------------------------------------------------
Now to the fun stuff: interfacing with the virtual machine. There are
@ -198,7 +189,7 @@ void stack_push(CELL value) {
---------------------------------------------------------------------*/
void generic_output() {
putchar(stack_pop());
stack_pop();
}
void generic_output_query() {
@ -266,8 +257,6 @@ void execute(int cell) {
if (ngaValidatePackedOpcodes(opcode) != 0) {
ngaProcessPackedOpcodes(opcode);
} else {
retro_puts("Invalid instruction!\n");
retro_puts("System halted.\n");
while(1);
}
ip++;

View file

@ -20,7 +20,8 @@
buffer:start s:chop ] buffer:preserve ;
:listen (-)
vga:initialize 'RETRO/Native s:put sp @Version #100 /mod n:put $. c:put n:put nl
vga:initialize
clear 'RETRO/Native s:put sp @Version #100 /mod n:put $. c:put n:put nl
repeat s:get-word valid? &interpret &drop choose again ;
&listen #1 store