THE WELCH COMPANY
440 Davis Court #1602
San Francisco, CA 94111-2496
415 781 5700
rodwelch@pacbell.net


S U M M A R Y


DIARY: December 2, 2008 08:11 PM Tuesday; Rod Welch

Letter from Steve on advantages using assembly for SDS 64-bit program.

1...Summary/Objective
........The MASM32 SDK version 10
............MASM32 Version 10 Downloads
............Teaching MASM32
............Support for MASM32
............DEP Compatibility
............Required OS Version
............Features...
............Application
............Things to Get
............Why Write Assembler


..............
Click here to comment!

CONTACTS 

SUBJECTS
Assembler 32-bit Code for Medit Gary Johnson Submits Techno  gy Sour

0403 -
0403 -    ..
0404 - Summary/Objective
0405 -
040501 - Follow up ref SDS 4 0000.
040502 -
040503 -
040504 -
040506 -  ..
0406 -
0407 -
0408 - Progress
0409 -
040901 - On 040505 Gary submitted a source to research using assembly to create
040902 - the next version of SDS with more memory by updating the current Medit
040903 - program based on assembly. ref SDS 1 QU8K
040905 -  ..
040906 - Earlier today on 081202, sent a letter to Steve asking for comments,
040907 - ref SDS 4 QW6G, on 2 or 3 advantages using assembly language rather
040908 - than Java. ref SDS 4 6R7V
040910 -  ..
040911 - This afternoon received a response from Steve...
040912 -
040913 -    1.  Subject:  Editor 16-bit Upgrade 64-bit Microsoft Vista with assembly language
040914 -        Date: Tue, 02 Dec 2008 15:46:37 -0800
040921 -         ..
040922 -    3.  Rod's letter on 081202 says...
040923 -
040924 -        Was hoping to get 2 or 3 advantages for upgrading the editor
040925 -        from 16-bit to 32-bit and/or 64-bit assembly, rather than write
040926 -        the program de novo with Java, which is the current effort.
040927 -        ref SDS 4 6R7Y
040929 -         ..
040930 -        Steve comments...
040932 -         ..
040933 -        Right.  It'll be difficult to recode into an entirely different
040934 -        language environment without needing to then fight for perfect
040935 -        compatibility on all of the "edge" cases.
040936 -
040937 -            [On 090403 2057 having trouble getting search to work
040938 -            correctly with the Java version of Medit. ref SDS 8 HL75
040940 -         ..
040941 -    4.  Rod's letter on 081202 says...
040942 -
040943 -        My colleagues say the only benefits of assembly are small
040944 -        program size and fast processing. ref SDS 4 6R8R
040946 -         ..
040947 -        Steve comments...
040949 -         ..
040950 -        That's true.  But to that I'd add another *significant* benefit
040951 -        ... which is that it's *already* in assembly language, so
040952 -        moving from 16-bits to 32-bits is a *vastly* smaller task which
040953 -        is inherently much less prone to translation errors than
040954 -        effectively recoding the underlying app from scratch in an
040955 -        entirely different language.
040957 -         ..
040958 -        (I'd recommend recoding in 32-bit MASM so that you have
040959 -        universal compatibility both with all current PC systems, and
040960 -        with future x64 platforms which will certainly be supporting
040961 -        x32 forever.)
040963 -  ..
040964 - This seems like good news to accomplish stability of Medit to run SDS
040965 - into the future and maintain compatibility with existing records.
040966 -
040967 -            [...below, Steve cites his "...own version of 32-bit
040968 -            assembler" and nice featrues of MASM he feels improve
040969 -            programming with elegant control structures. ref SDS 0 8L6W
040971 -             ..
040972 -            [On 081204 0630 visited Morris and reviewed Steve's letter
040973 -            on 081202; Morris feels prospects of Microsoft supporting
040974 -            "x32 forever," means 5 years. ref SDS 5 YK4J
040976 -             ..
040977 -            [On 081204 0630 checked DOS prompt on Morris' Vista
040978 -            computer with 64-bit technology, and it seems to support
040979 -            all DOS commands used by SDS in Windows XP; does this align
040980 -            with Steve's experience? ref SDS 5 V24F
040982 -  ..
040983 - Steve's letter continues...
040984 -
040985 -    5.  Rod's letter on 081202 says...
040986 -
040987 -        They note increasing memory for SDS from 640K to 64 MB makes
040988 -        size a non-issue, and running SDS on 64-bit quad-core
040989 -        processors will maintain SDS responsiveness using Java, rather
040990 -        than assembly.  I have doubts.  Making the program bigger, and
040991 -        increasing the size of work files may reduce responsiveness,
040992 -        even for faster processors. ref SDS 4 6R8R
040994 -         ..
040995 -        Steve comments...
040997 -         ..
040998 -        Right.  In fairness, on the "plus side" for JAVA, is that it's
040999 -        a platform-independent solution with JVMs available pretty much
041000 -        everywhere.  So there's something to said for that as well.
041001 -        And they're likely right that current machines are SO FAST that
041002 -        JAVA would work well.  At least for anything that's
041003 -        predominantly interactive and not heavily computational.
041005 -         ..
041006 -    6.  Rod's letter on 081202 says...
041007 -
041008 -        My sense is that the current program in 16-bit assembly has
041009 -        worked well for 30 years, as SDS evolved through trial and
041010 -        error into a robust application. ref SDS 4 6R8U
041012 -         ..
041013 -        Steve comments...
041015 -         ..
041016 -        Right -- and by keeping it in assembler, just expanding the
041017 -        code from 16-bits to 32-bits -- you RETAIN 100% of all of the
041018 -        trial and error work.
041020 -         ..
041021 -    7.  Rod's letter on 081202 says...
041022 -
041023 -        Therefore continuing this platform in 32-bit or 64-bit assembly
041024 -        introduces the fewest changes that have to be solved for
041025 -        getting macros to run in order to maintain continuity of SDS
041026 -        development and daily use for Knowledge Management. ref SDS 4
041027 -        XF5F
041029 -         ..
041030 -        Steve comments...
041032 -         ..
041033 -        Yep.  That's without question I'd say.  The JAVA project might
041034 -        be more appealing to anyone who is not comfortable with
041035 -        assembler, but it's also the case that whereas the straight
041036 -        16-bit to 32-bit translation is LINEAR, the JAVA conversion
041037 -        could wind up taking MUCH longer -- it could become a black
041038 -        hole as the recoders attempt to get it to work in exactly the
041039 -        same way.
041040 -
041041 -            [On 090403 2057 having trouble getting search to work
041042 -            correctly with the Java version of Medit. ref SDS 8 HL75
041044 -         ..
041045 -        One of the reasons I choose -- to this day -- to code in
041046 -        assembler is that there's no compiler producing anything
041047 -        unexpected.  I control exactly what the outcome will be.
041049 -  ..
041050 - Does this include controlling the font, which Morris feels is an
041051 - insurmountable problem using Java, reported on 081114, ref SDS 3 PS6O,
041052 - and things like function keys which evidently are also called by the
041053 - OS.  The current Medit provides all of this control, but there has
041054 - been concern that Java has less control.
041056 -  ..
041057 - At that time on 081114 Morris considered going back to assembler to
041058 - program the Medit version for 32-bit and 64-bit technology in the DOS
041059 - emulator. ref SDS 3 MW7O
041060 -
041061 -           [On 090320 2019 Morris had trouble controlling F10.
041062 -           ref SDS 6 YR5U
041064 -            ..
041065 -           [On 090331 0630 Morris problems controlling pa7, and advised
041066 -           other function keys may present problems, ref SDS 7 XN4F;
041067 -           seemed to eventually get pf10 and pa7 to work correctly, but
041068 -           evidently only for Microsoft; there may be further problems
041069 -           with Unix. ref SDS 7 PA4L
041071 -  ..
041072 - Steve's letter continues...
041074 -         ..
041075 -    8.  Rod's letter on 081202 says...
041076 -
041077 -        You seem enthusiastic about assembly, so I thought you might
041078 -        have several points that could inform our considerations.
041079 -        ref SDS 4 6R8X
041081 -         ..
041082 -        Steve comments...
041084 -         ..
041085 -        I've been coding in assembler my entire life and all of my
041086 -        software is written in assembler.  All of my web site's special
041087 -        services are coded in assembler.  My own mode of 32-bit
041088 -        assembler looks quite a bit different from others (see attached
041089 -        PNG image) thanks to my use of readable variable names and the
041090 -        nice features of MASM which allow for some elegant control
041091 -        structures.
041093 -  ..
041094 - Can Steve's "mode" of 32-bit assembler" and MASM control structures
041095 - make the Medit update process easier and/or better documented than
041096 - using other tools?
041098 -  ..
041099 - Where is this available, and how much does it cost?
041101 -  ..
041102 - On 081114 Morris was worried that trying to use assembler would cost a
041103 - lot of money to purchase software development tools, ref SDS 3 RM5M,
041104 - cited initially on 081104. ref SDS 2 VN6F
041106 -  ..
041107 - Gary Johnson later found a website that seems to indicate MASM
041108 - compiler is available free, similar to Java tools Morris proposees...
041109 -
041110 -
041111 -        The MASM32 SDK version 10
041112 -
041113 -              http://www.masm32.com/
041114 -
041116 -             ..
041117 -            MASM32 Version 10 Downloads
041118 -
041119 -
041120 -              http://www.masm32.com/masmdl.htm
041121 -
041123 -             ..
041124 -            Teaching MASM32
041125 -
041126 -            Reference for teachers at educational institutions
041127 -
041128 -              http://www.masm32.com/teaching/index.htm
041129 -
041131 -             ..
041132 -            Support for MASM32
041133 -
041134 -            The MASM Forum...
041135 -
041136 -              http://www.masm32.com/board/index.php
041138 -             ..
041139 -            The MASM32 SDK version 10 is a working development
041140 -            environment for programmers who are interested in either
041141 -            learning or writing 32 bit Microsoft assembler (MASM). The
041142 -            installation is an automated process that installs the
041143 -            correct directory tree structure on the local drive of
041144 -            your choice. Note that MASM32 will not install on a
041145 -            network drive. MASM32 comes with its own runtime library
041146 -            written fully in assembler and an extensive range of
041147 -            macros for improved high level emulation and faster
041148 -            development. It builds its own IMPORT libraries for the
041149 -            Windows API functions and supplies its own include files
041150 -            for a very large number of API functions.
041152 -             ..
041153 -            The default editor in MASM32 has been fully recoded from
041154 -            scratch in MASM and it is smaller, faster and more
041155 -            powerful with two (2) separate scripting engines, a legacy
041156 -            version to maintain backwards compatibility of existing
041157 -            scripts and a completely new one that is much faster and
041158 -            more powerful than its predecessor. New CHM documentation
041159 -            and a wider range of "Create New" project types directly
041160 -            supported by the new script engine from the editor place a
041161 -            wider range of project types at your fingertips. There is
041162 -            also a new format PLUGIN system for the default editor as
041163 -            well as the old one for backwards compatibility.
041165 -             ..
041166 -            DEP Compatibility
041167 -
041168 -            The MASM32 SDK has been rebuilt to ensure it is fully
041169 -            compatible with the Data Execution Prevention safety
041170 -            feature in later versions of Windows.
041172 -             ..
041173 -            Required OS Version
041174 -
041175 -            The MASM32 SDK requires Win2000 or higher Windows
041176 -            versions. A legacy version will be supplied for earlier
041177 -            Windows versions.
041179 -             ..
041180 -            Features...
041181 -
041182 -
041183 -            1.  The most up to date version of Ray Filiatreault's
041184 -                floating point library and tutorial.
041186 -                 ..
041187 -            2.  A completely new dedicated time and date library
041188 -                written by Greg Lyon.
041190 -                 ..
041191 -            3.  The MASM32 library with over 200 procedures for
041192 -                writing general purpose high performance code.
041194 -                 ..
041195 -            4.  A new dynamic array system for variable length
041196 -                string and binary data with both a macro and procedural
041197 -                interface.
041199 -                 ..
041200 -            5.  The include files and libraries have been
041201 -                upgraded to XP SP2.
041203 -                 ..
041204 -            6.  A specialised linker, resource compiler and
041205 -                assembler from Pelle's tool set with working examples.
041207 -                 ..
041208 -            7.  An extensive range of example code ranging from
041209 -                simple examples to more complex code design.
041211 -                 ..
041212 -            8.  Prebuilt scripts in the editor for creating working
041213 -                templates for assembler projects.
041215 -                 ..
041216 -            9.  A very easy to use console interface for developing
041217 -                algorithms, test code and experimental ideas in code.
041218 -                More ......
041219 -
041221 -             ..
041222 -            Targeted Users
041224 -             ..
041225 -            The MASM32 SDK is targeted at experienced programmers who
041226 -            are familiar with writing software in 32 bit versions of
041227 -            Windows using the API interface and who are familiar with
041228 -            at least some direct mnemonic programming in assembler. It
041229 -            is not well suited for beginner programmers due to the
041230 -            advanced technical nature of programming in assembler and
041231 -            beginners are advised to start with a compiler first to
041232 -            learn basic concepts like addressing, programming logic,
041233 -            control flow and similar.
041235 -             ..
041236 -            Application
041237 -
041238 -            MASM is routinely capable of building complete executable
041239 -            files, dynamic link libraries and separate object modules
041240 -            and libraries to use with the Microsoft Visual C
041241 -            development environment as well as MASM. It is an esoteric
041242 -            tool that is not for the faint of heart and it is
041243 -            reasonably complex to master but in skilled hands it has
041244 -            performance that is beyond the best of modern compilers
041245 -            when properly written which makes it useful for
041246 -            performance critical tasks.
041248 -             ..
041249 -            Things to Get
041250 -
041251 -            For both space and copyright reasons the MASM32 SDK does
041252 -            not include reference material from either the Intel
041253 -            Corporation or the Microsoft Corporation but both make the
041254 -            best comprehensive reference material available as free
041255 -            downloads.
041257 -             ..
041258 -            With the Intel Corporation you would obtain the PIV set of
041259 -            manuals or later for compete mnemonic and architecture
041260 -            reference and with the Microsoft Corporation you can either
041261 -            use their online MSDN reference or download an appropriate
041262 -            PLATFORMSDK or its successor for you own version of
041263 -            Windows.  If you can still find it it is useful to have the
041264 -            very old WIN32.HLP file on your computer even if you have
041265 -            to download the Winhelp engine to use it on OS versions
041266 -            like Vista as it is a lot faster to load than the later CHM
041267 -            format help files and works with the F1 help key system
041268 -            built into the default editor.
041270 -             ..
041271 -            Why Write Assembler
041272 -
041273 -            The simple answer is because you can.  While there are very
041274 -            good compilers that in many instances produce good quality
041275 -            code when run with the right options, you are usually stuck
041276 -            with doing things their way where with an assembler as
041277 -            powerful as MASM you have a high degree of architectural
041278 -            freedom which you manipulate to your design advantage to
041279 -            produce high precision high performance code without
041280 -            compromise to language format or compiler designer
041281 -            preference
041283 -             ..
041284 -            MASM's flexibility allows the skilled programmer to target
041285 -            areas as diverse as dynamic link libraries for Visual
041286 -            basic, object modules that are linked directly into a
041287 -            Visual C program and of course complete executable files
041288 -            for task critical applications.  MASM when mastered
041289 -            correctly puts power and performance into the hands of
041290 -            programmers that few have ever seen and contrary to popular
041291 -            opinion, a modern assembler like MASM used in conjunction
041292 -            with both macros and libraries can be coded at about the
041293 -            same speed and reliability as C code.
041295 -  ..
041296 - Steve's letter continues...
041297 -
041298 -    9.  Rod's letter on 081202 says...
041299 -
041300 -        On your last point about running SDS with Virtual PC, have
041301 -        [you] done this and so know from experience it will work?  We
041302 -        have been running SDS with NTVD in Windows XP; that is what I
041303 -        would first consider using.  Any reason to try Windows 3.1
041304 -        mentioned in your letter today? ref SDS 4 6R9Q
041306 -         ..
041307 -        Steve comments...
041309 -         ..
041310 -        Oh, no.  It was just that a VM allocates main memory
041311 -        statically, taking it away from the host OS.  So since your
041312 -        code is 16 bits, it could presumably run in Windows 3.1, which
041313 -        has a much smaller RAM requirement footprint than XP.
041315 -         ..
041316 -        All the best,
041318 -         ..
041319 -        Steve.
041320 -
041321 -
041322 -
041323 -
041324 -
041325 -
041326 -
041327 -
041328 -
041329 -
041330 -
041331 -
0414 -