Author Topic: Two macros and a library module  (Read 206 times)

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 9749
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Two macros and a library module
« on: August 04, 2022, 10:05:52 AM »
The library module is a console mode location algorithm that sets the column and row where text is located on a console.

There are two macros to make them more convenient to use.

    coninpt MACRO colm,row,txt,buff,blen
      rcall locate,colm,row
      conout txt
      rcall StdIn,buff,blen
    ENDM

    conoutpt MACRO tcolm,trow,args:VARARG
      rcall locate,tcolm,trow
      FOR var,<args>
        IFIDN <var>,<lf>        ;; line feed
          stdout chr$(13,10)
        ELSEIFIDN <var>,<tab>   ;; tab
          stdout chr$(9)
        ELSEIFIDN <var>,<qt>    ;; double quote "
          stdout chr$(34)
        ELSE
          stdout reparg(var)    ;; quoted text or normal text address
        ENDIF
      ENDM
    ENDM

I have already added the macros to the main macro file and the module into the main library, they are included here for anyone who is interested in console display.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy:

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 9749
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Two macros and a library module
« Reply #1 on: August 04, 2022, 08:23:04 PM »
This is a set of 4 floating point calculation apps that are designed to be called from either of the editors. Console interfaces, start, do calculation and the result is written to the clipboard. Tested with the new editor and they work well. I have not posted the source as the macros and lib module are not available in the macro file or library yet but they will be posted in the next version.
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :skrewy: