I'm busy creating a diagnostic ROM for the IBM-AT and compatibles. I'll need a 32 KB EPROM but I think I only need 16 KB for the actual code. So:
org 8000h
setloc 0C000h ; macro that fills range between this address and last code with 0FFh
L_start:
..... code ...
I want to calculate the checksum of the EPROM as part of the test. The number of bytes to test is 64 KB minus the starting address, thus:
mov cx,10000h-L_start
and here I get an error: invalid operand type. If I replace the minus with a plus, things go fine where I maybe would expect a kind of "number too big" error. Using "strict word" does not help. I could calculate the checksum of the whole ROM as work around but I'm sure I will need the above calculation again. So I would like to know what is going on.
Thank you in advance for any help!
Kind regards, Ruud Baltissen