Skip to content

Commit

Permalink
ootw: add assert if loader gets bigger than 3 pages
Browse files Browse the repository at this point in the history
  • Loading branch information
deater committed Jan 27, 2020
1 parent 48dea30 commit 6fa80d7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ootw/loader.s
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ filbuf = $3D6 ; filbuf: .res 4 ; = bit2tbl+86
;===================================================
;===================================================

start:
loader_start:
jsr init ; unhook DOS, init nibble table


Expand Down Expand Up @@ -706,3 +706,6 @@ sectbl: .byte $00,$0d,$0b,$09,$07,$05,$03,$01,$0e,$0c,$0a,$08,$06,$04,$02,$0f
;filbuf: .res 4 ; = bit2tbl+86
;dataend = filbuf+4

loader_end:

.assert (<loader_end - <loader_start)>3, error, "loader too big"

0 comments on commit 6fa80d7

Please sign in to comment.