Interrupt system implemented, some new programs.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
; #Align before either segment has been opened.
|
||||
;
|
||||
; The directive moves a cursor along, and outside a segment there is no cursor for
|
||||
; it to move, so this has to be an error rather than quietly doing nothing.
|
||||
|
||||
#Align 0x100
|
||||
|
||||
#Program
|
||||
|
||||
start:
|
||||
HALT
|
||||
@@ -0,0 +1,10 @@
|
||||
; #Align with no number after it.
|
||||
;
|
||||
; Without this check the next token is taken as the alignment, which would silently
|
||||
; align to whatever the following instruction happened to be worth.
|
||||
|
||||
#Program
|
||||
|
||||
start:
|
||||
HALT
|
||||
#Align
|
||||
@@ -0,0 +1,10 @@
|
||||
; Deliberately broken, to check that the assembler still catches it.
|
||||
; The file ends straight after the keyword, so there is no name to read. This
|
||||
; used to walk into whatever the array happened to hold and crash.
|
||||
|
||||
#Program
|
||||
|
||||
start:
|
||||
HALT
|
||||
|
||||
#Include
|
||||
@@ -0,0 +1,10 @@
|
||||
; SWI with nothing after it.
|
||||
;
|
||||
; Without the operand check this assembles, and SWI quietly takes the next
|
||||
; instruction as its vector number. Everything after it then shifts by a byte.
|
||||
|
||||
#Program
|
||||
|
||||
start:
|
||||
SWI
|
||||
HALT
|
||||
@@ -0,0 +1,14 @@
|
||||
; Deliberately broken, to check that the assembler still catches it.
|
||||
; The same name is defined twice, which used to be accepted silently, with every
|
||||
; reference quietly resolving to whichever definition came first.
|
||||
|
||||
#Program
|
||||
|
||||
start:
|
||||
BRI twice
|
||||
|
||||
twice:
|
||||
HALT
|
||||
|
||||
twice:
|
||||
HALT
|
||||
@@ -0,0 +1,20 @@
|
||||
; Two handlers claiming the same vector.
|
||||
;
|
||||
; Device lines name a port directly, so two of them can collide even though the
|
||||
; assembler numbers the named vectors itself.
|
||||
|
||||
#Program
|
||||
|
||||
start:
|
||||
HALT
|
||||
|
||||
firstHandler:
|
||||
RETI
|
||||
|
||||
secondHandler:
|
||||
RETI
|
||||
|
||||
#Vectors
|
||||
|
||||
Device 0x10 firstHandler
|
||||
Device 0x10 secondHandler
|
||||
@@ -0,0 +1,10 @@
|
||||
; SWI names something that was never given a handler.
|
||||
;
|
||||
; A vector name is not a label, so the usual "undefined label" error would be
|
||||
; misleading. It has to say that the name needs a #Vectors entry.
|
||||
|
||||
#Program
|
||||
|
||||
start:
|
||||
SWI neverDeclared
|
||||
HALT
|
||||
Reference in New Issue
Block a user