VOGONS

Common searches


First post, by freecrac

User metadata
Rank Newbie
Rank
Newbie

I am on an Android tablet with the Magic DOSBOX app installed and i try to make a counter for hexadecimal values (with a little help from Debug).

The counter starts with 00 and ends with FF..

But i am not sure if the envroment variables are always stored on the same memory location. Example: 0000:12B0

If it run properly it prints the hex numbers on the screen:
00
01
03
..
EE
EF
FF

Please can you test the batch file and give an answer if it works or not.

@Echo off
REM *LOOP.BAT*
set VA=00
REM Loop from VA to if command
REM Hex-Counter for VA
echo a cs:100>tmp.deb
echo xor ax,ax>>tmp.deb
echo mov ds,ax>>tmp.deb
echo mov si,12B0>>tmp.deb
echo mov ax,4156>>tmp.deb
echo cmp [si],ax>>tmp.deb
echo jz 0111>>tmp.deb
echo inc si>>tmp.deb
echo jnz 010A>>tmp.deb
echo add si,3>>tmp.deb
echo mov ah,[si]>>tmp.deb
echo mov al,[si+1]>>tmp.deb
echo cmp al,39>>tmp.deb
echo ja 0123>>tmp.deb
echo jnz 0136>>tmp.deb
echo mov al,41>>tmp.deb
echo jmp 0138>>tmp.deb
echo cmp al,46>>tmp.deb
echo jnz 0136>>tmp.deb
echo mov al,30>>tmp.deb
echo cmp ah,39>>tmp.deb
echo jnz 0132>>tmp.deb
echo mov ah,41>>tmp.deb
echo jmp 0138>>tmp.deb
echo inc ah>>tmp.deb
echo jmp 0138>>tmp.deb
echo inc al>>tmp.deb
echo mov [si],ah>>tmp.deb
echo mov [si+1],al>>tmp.deb
echo ret>>tmp.deb
echo.>>tmp.deb
echo n VAR.COM>>tmp.deb
echo rcx>>tmp.deb
echo 3E>>tmp.deb
echo wcs:100>>tmp.deb
echo q>>tmp.deb
debug<tmp.deb>nul
del tmp.deb
:A1
VAR.COM
echo %VA%
if %VA% ==FF goto END
goto A1
:END
set VA=
del VAR.COM

Debug from the Freedos Operating System:
http://sites.google.com/site/pcdosretro/enhdebug
http://www.ibiblio.org/pub/micro/pc-stuff/fre … html/debug.html
Debug manual: http://www.armory.com/~rstevew/Public/Tutor/D … bug-manual.html
(Download and extract debug into the mounted folder of DOSBOX.)