hey ive done the thing :P
ive included the program with the source in the attachment
and here is the conversion algorithm (ive written it fast so its pretty bulky but works properly):
(it can convert numbers up to 9999, but the range can be easily extended)
numtoroman proc uses ebx numin : DWORD, romout : DWORD
LOCAL numlen : DWORD
invoke lstrlen, numin
mov numlen, eax
mov eax, -1
mov ebx, numin
mov ecx, 0
mov edx, romout
@@:
inc eax
cmp byte ptr[ebx + eax], 0h
je lblret
cmp byte ptr[ebx + eax], '1'
jne lbl1
.if numlen == 1
mov byte ptr[edx + ecx], 'I'
.elseif numlen == 2
.if eax == 0
mov byte ptr[edx + ecx], 'X'
.else
mov byte ptr[edx + ecx], 'I'
.endif
.elseif numlen == 3
.if eax == 0
mov byte ptr[edx + ecx], 'C'
.elseif eax == 1
mov byte ptr[edx + ecx], 'X'
.else
mov byte ptr[edx + ecx], 'I'
.endif
.elseif numlen == 4
.if eax == 0
mov byte ptr[edx + ecx], 'M'
.elseif eax == 1
mov byte ptr[edx + ecx], 'C'
.elseif eax == 2
mov byte ptr[edx + ecx], 'X'
.else
mov byte ptr[edx + ecx], 'I'
.endif
.endif
inc ecx
jmp @B
lbl1:
cmp byte ptr[ebx+eax], '2'
jne lbl2
.if numlen == 1
mov word ptr[edx + ecx], 'II'
.elseif numlen == 2
.if eax == 0
mov word ptr[edx + ecx], 'XX'
.else
mov word ptr[edx + ecx], 'II' …