Add empty data directive warning

Fixes #516
This commit is contained in:
James Larrowe
2020-05-05 10:27:55 -04:00
parent 12693081c9
commit bdf397bba7
8 changed files with 38 additions and 6 deletions

View File

@@ -3,6 +3,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include "asm/fstack.h"
#include "asm/main.h"
@@ -434,11 +435,14 @@ void out_AbsByteGroup(uint8_t const *s, int32_t length)
/*
* Skip this many bytes
*/
void out_Skip(int32_t skip)
void out_Skip(int32_t skip, bool ds)
{
checksection();
reserveSpace(skip);
if (!ds && sect_HasData(pCurrentSection->nType))
warning(WARNING_EMPTY_DATA_DIRECTIVE, "db/dw/dl directive without data in ROM");
if (!sect_HasData(pCurrentSection->nType)) {
growSection(skip);
} else if (nUnionDepth > 0) {