Complain if either the text or data segments are missing

This commit is contained in:
david-schmidt 2021-06-10 11:47:23 -04:00
parent 8c282ca501
commit 598a69c02b
2 changed files with 10 additions and 3 deletions

View File

@ -92,13 +92,13 @@ Command line syntax for these Options:
positional arguments:
o65file Input o65 code file to be converted
sosfile SOS.DRIVER file to list the contained drivers
sosfile SOS.DRIVER file to add driver to (driver must not already exist)
usage: A3Driverutil.py update [-h] o65file sosfile
positional arguments:
o65file Input o65 code file to be converted
sosfile SOS.DRIVER file to be updated
sosfile SOS.DRIVER file to be updated (an existing driver will be updated)
```
## Convert o65 binary and output as driver binary file

View File

@ -174,7 +174,14 @@ def convert_o65(file):
#print ("tlen: ",tlen)
#print ("dbase: ",dbase)
#print ("dlen: ",dlen)
if tlen == 0:
print("No text segment found; ensure your driver defines .segment \"TEXT\"")
exit(1)
if dlen == 0:
print("No data segment found; ensure your driver defines .segment \"DATA\"")
exit(1)
#skip over header options
olen = readUnpack(o65file,1,type = '1')
while olen != 0 : #0 marks end of options header