HPASM was obtained from http://oscar.taurus.com/~jeff/2100/index.html and assembled for Windows using LCC (I think... been awhile). HPASM has problems with some compound instruction combinations, when it happens the first letter of the instruction is replaced by a space. Use HP-IPL/OS' CREATE or OCT_TOOL to derive the correct octal code and replace problem compounds with OCT lines. Seems both CREATE and OCT_TOOL can get it wrong at times so it's probably a good idea to get multiple opinions, if any doubt pack the instruction bits manually. HPASM does not support extended math or DMS instructions, encode these as OCT statements. Despite a few minor problems, HPASM is the only game in town for assembling HP21xx code on a PC. HPASM accepts a source filename on the command line and outputs hpasm.lst assembly listing and hpasm.out ABS-encoded binary. Renaming files is tedious, I like to right-click and assemble so I wrote MPA.BAT that renames the output files in accordance with the input file. To right-click and assemble HPA files use Windows' file type dialogs to add an assemble option for .HPA files that runs MPA.BAT, or use at the dos command line, MPA file. ----------------- cut, MPA.BAT ------------------------------ :: MPA.BAT by Terry Newton 1/13/02 :: Runs the MPASM 21xx cross-assembler and renames the :: output files to match the source name. Drag-n-drop capable. :: If no parameter or non existing file specified, lists directory. :: Requirements... nothing special but %temp% variable must point :: to a writable directory - creates, uses then deletes temp com :: and batch files for parsing the parameter into directory, base :: and extension components. Take care not to alter the binary parts! :: Output .out and .lst files created in the same dir as the source. :: If no extension specified defaults to .HPA, edit batch to change. @echo off if .%1==.Shell goto %1 %comspec% /e:32768 /c%0 Shell %1 goto end :Shell :: change dir-list extension as needed... set default_ext=HPA :: -------------------------------------- :: list directory if no parm specified... if .%2==. goto listdir :: temp filenames... set tf=%temp%.\_mpa.tmp set dec=%temp%.\_dec.com set sepname=%temp%.\_sep.com ::----------------------- :: CM3-encoded DecBin decoder... ECHO:`h}aXP5y`P]4nP_XW(F4(F6(F=(FF)FH(FL(Fe(FR0FTs*}`A?+,>%dec% ECHO:fkOU):G*@Crv,*t$HU[rlf~#IubfRfXf(V#fj}fX4{PY$@fPfZsZ$:NvN$>>%dec% ECHO:9AyroNB-)dOKwK0rRkfTbi)ws_~[[q9wE'sqlu1sY*Bsfe=@ziN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eTW5rhv2vpNT1bV\3b7T3b2\2yV\3b8Z1bNV3b8s1bUK3b8m1b>>%tf% ECHO:LR3b8g1bNd3b8a1bV\3b8X1bLR3b8R1bNo3b8L1bWp3b8F1bLR3b892n9C>>%tf% ECHO:F07DAn83Fy3D4me0Z23xlZLI2Au6y0IZK5i3WMLI3x7AcKb5Zjuxlnn2jG>>%tf% ECHO:m3xfdd30coy3PHLNtBvla0iymyylUhyHg9Z1sVLP73LNPMLNXUuXiyZOXU>>%tf% ECHO:uRiyZ8s1LVf3yvRmA[DPlxPG2yNy3byRy3TGLMmvdhHo0AN0VrwULOi3Zr>>%tf% ECHO:6sK0ivZqlfD1Pl0vwQS20ftdBYy3ebaygGZ8]3v0gxEBOUK5IXK5tBDIr5>>%tf% ECHO:46w8I33y1yC2Fy2tK0Bqr37rqa2r2j2ElnnFjGSv1nW5f0trZ0Jvb]p857>>%tf% ECHO:ZYv7WVK186K5y3hXW6s3uyhXW6ryr0gGv6hXW6rnuyhXW6r1C0lyQX3bva>>%tf% ECHO:xxQX2yPG3bvUxxPG3bvWxyPG2BF83rpA603u9yCBF0M819DFZsn0Vhy3hX>>%tf% ECHO:W6uruxhXC6F9l0CWTo16D1ZsLHVn6sK02yK6Fvv]E[m786K5013yG6K5t3>>%tf% ECHO:DKb55ov4vELK2tLO2nn9jXtB5Ib5ZJexlBGUK5EAyxFEFRAn3DCGkLlBtB>>%tf% ECHO:Hp2yPG2BPE3vRmA[0ml8n5N2041LlBt3Bf0ma0X6ixXpW4t8ix9606I9s6>>%tf% ECHO:vw001wW6f1[0X6yxgGO6j5f0Xpv4gGC61puxIs1H0esEyvRmA[0ml8f5Z\>>%tf% ECHO:9Tj4v0iyC5F0M933xxv5mbFxF3LGmbuyyvgGW6K3ujHPRmA[N600N3MBif>>%tf% ECHO:XpW4r\ixZ86u00QBK42nJDnXN202014000070DGA8D0A07000000000000>>%tf% ECHO:0000000000000000000000000000000000000000000000000000000000>>%tf% ECHO:0000000000000000000000000000000000000000000000000000000000>>%tf% ECHO:00000000whOW5jPl1g0000000000j0K00h000000001mH\SW1]TXXnOwC0>>%tf% ECHO:T\1n9]5YPmo\C0LmPnOWP\HrSwn0}>>%tf% :: BASM source... :: rem separate specified name into fpath,fbase,fext :: rem outputs sets to stdout :: $com :: a$=command$:a$=trim$(a$):a$=lcase$(a$) :: if a$="" then :: print "no parm":end :: endif :: rem loop through string, mark last \ and . :: slash=0:dot=0:ilen=len(a$) :: for i=1 to ilen :: c$=mid$(a$,i,1):if c$="\" then slash=i :: if c$="." then dot=i :: next i :: rem not an extension if \ after . :: if slash>dot then dot=0 :: fpath$="":fbase$=a$:fext$="" :: if dot>1 then :: d=dot-1:fbase$=left$(a$,d) :: d=ilen-dot:fext$=right$(a$,d) :: endif :: if slash>1 then :: rem includes trailing \ :: d=slash:fpath$=left$(a$,d) :: d=len(fbase$):d=d-slash :: fbase$=right$(fbase$,d) :: endif :: output "set fpath=";fpath$ :: output "set fbase=";fbase$ :: output "set fext=";fext$ ::------------------------------- :: decode and use _sepname.com to parse input (in %2) %dec% < %tf% > %sepname% %sepname% %2 > %temp%.\_sep_tmp.bat call %temp%.\_sep_tmp.bat del %temp%.\_sep_tmp.bat del %sepname% del %dec% del %tf% if .%fpath%==. goto incurrent :: change to source directory %fpath% cd %fpath% :incurrent :: add extension if not specified... ::---- put commands here... :: %fbase% = base name :: %fext% = extension (no dot) :: %fpath% = path (ends in \) :: %2 = name as entered :: current dir is where the file is ::--------------------------------- set filename=%2 if exist %filename% goto fileok set filename=%2.%default_ext% if exist %filename% goto fileok echo File not found. List... goto listdir :fileok hpasm %filename% copy hpasm.lst %fbase%.lst >nul copy hpasm.out %fbase%.out >nul del hpasm.lst del hpasm.out ::--------------------------------- choice /c:q /t:q,2 >nul cls goto end :listdir dir /p *.%default_ext% :end ----------------- end of MPA.BAT ---------------------------- 9/6/04 Terry Newton