flat assembler
Message board for the users of flat assembler.

Index > Projects and Ideas > FASM1+FASMG AllInOne package

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
guignol



Joined: 06 Dec 2008
Posts: 763
guignol 27 Jul 2017, 07:26
What's "now and portable"?

_________________
qiq;
Post 27 Jul 2017, 07:26
View user's profile Send private message Reply with quote
ProMiNick



Joined: 24 Mar 2012
Posts: 799
Location: Russian Federation, Sochi
ProMiNick 27 Jul 2017, 08:12
For now portable is mean that package is path independent.
first of all there is no fasm IDE for other OSes... And I don`t know script languages of other OSes. So I can`t realize it myself.
If thou want to realize it for any other OS: thuo should find text editor in that OS or with customization of menus or opensourced and add to it menu for launching of thour scripts.
Thou should realize compilation scripts and for fasmg and for fasm1, because thou will have console both. All rest except fasmw IDE and windows scripts thou can copy and use.

If thou want to realize it for any other opcodeset (so it is no for my level of programming)...
(I tryed to play with MOS6502) but generaly all other opcodeset except x86x64 is dark forest for me.
Post 27 Jul 2017, 08:12
View user's profile Send private message Send e-mail Reply with quote
guignol



Joined: 06 Dec 2008
Posts: 763
guignol 27 Jul 2017, 09:55
is sochelnik in any way connected to sochi
Post 27 Jul 2017, 09:55
View user's profile Send private message Reply with quote
ProMiNick



Joined: 24 Mar 2012
Posts: 799
Location: Russian Federation, Sochi
ProMiNick 01 Aug 2017, 20:55
mistake from morning of 01.08.2017 fixed:
Code:
    dd current_dir_box_lib,cur_dir_path,library_path,system_dir_box_lib,err_message_found_lib0,head_f_l, box_lib.lookup, err_message_import0, head_f_i,0,0,0
    dd current_dir_proc_lib,cur_dir_path,library_path,system_dir_proc_lib,err_message_found_lib0,head_f_l, proc_lib.lookup, err_message_import0, head_f_i,0,0,0    


it is a pity that it is impossible to test kolibri apps at work time - only blind develop.


Description:
Filesize: 46.89 KB
Viewed: 7692 Time(s)

success launch.JPG


Post 01 Aug 2017, 20:55
View user's profile Send private message Send e-mail Reply with quote
ProMiNick



Joined: 24 Mar 2012
Posts: 799
Location: Russian Federation, Sochi
ProMiNick 02 Aug 2017, 10:20
due to imposibility to work kolibri at day time I back to fasmg resource macros:

DIALOG,DIALOGEX,DIALOGITEM,DIALOGITEMEX,DIALOGITEMEXTRADATA tested and worked:
fasmg
Code:
ANSl_CHARSET       = 0
DEFAULT_CHARSET     = 1
SYMBOL_CHARSET      = 2
MAC_CHARSET         = 77
SHIFTJIS_CHARSET    = 128
HANGEUL_CHARSET     = 129
HANGUL_CHARSET      = 129
JOHAB_CHARSET       = 130
GB2312_CHARSET      = 134
CHINESEBIG5_CHARSET = 136
GREEK_CHARSEÒ       = 161
TURKISH_CHARSET     = 162
VIETNAMESE_CHARSET  = 163
HEBREW_CHARSET      = 177
ARABIC_CHARSET      = 178
BALTIC_CHARSET      = 186
THAI_CHARSET        = 222
EASTEUROPE_CHARSET  = 238
RUSSIAN_CHARSET     = 204
OEM_CHARSET         = 255

macro dialog? ¤class,¤title,¤x,¤y,¤cx,¤cy,¤style,¤exstyle,¤menu,¤fontname,¤fontsize
   local items
   if ¤style and 0FFFF0000h = 0FFFF0000h
     .err dialog version mismatch
   end if
   dd ¤style,¤exstyle+0
   dw items,¤x,¤y,¤cx,¤cy
   if ¤menu+0 = 0
     dw 0
   else if ¤menu eqtype ''
     du ¤menu,0
   else
     dw 0FFFFh,¤menu
   end if
   if ¤class+0 = 0
     dw 0
   else if ¤class eqtype ''
     du ¤class
   else
     dw 0FFFFh,¤class
   end if
   match any,¤title
     du ¤title ;,0 from common case below
   end match
              dw 0

   if ¤style and DS_SETFONT
     match any,¤fontname
       du ¤fontsize+0,¤fontname,0
     else
       du 8,'MS Sans Serif',0
     end match
   end if
   align 4
   dialog_items_counter = 0


   macro dialogitem? class,titleorID,id,x,y,cx,cy,style,exstyle
     align 4
     dd style or WS_CHILD,exstyle+0
     dw x,y,cx,cy,id
     match ,class
       dw 0
     else if class eqtype ''
       if class eq 'BUTTON'
         dw 0FFFFh,80h
       else if class eq 'EDIT'
         dw 0FFFFh,81h
       else if class eq 'STATIC'
         dw 0FFFFh,82h
       else if class eq 'LISTBOX'
         dw 0FFFFh,83h
       else if class eq 'SCROLLBAR'
         dw 0FFFFh,84h
       else if class eq 'COMBOBOX'
         dw 0FFFFh,85h
       else if class eq ''
         dw 0
       else
         du class
       end if
     else
       if (class and 1Fh) =10 | (class and 1Fh) =16 | (class-(class and 80h))>18h | class<0
         .err unsupported classID = class
       end if
       dw 0FFFFh,class
     end if
     if titleorID+0 = 0 ; no title no subitems
       dw 0
     else if titleorID eqtype '' ;title
       du titleorID,0
     else
       dw 0FFFFh,titleorID ; subitem: ID of ICO,BMP ... etc.
     end if
     dw 0
     dialog_items_counter = dialog_items_counter + 1

     purge dlgitmxtrdata?
     macro dlgitmxtrdata?
       local fin
       store fin-$:word at $-2

       macro end?.dlgitmxtrdata?
         fin = $
         purge dlgitmxtrdata?, end?.dlgitmxtrdata?
       end macro
     end macro
   end macro

   macro end?.dialog?
     items = dialog_items_counter
     purge dialogitem?, end?.dialog?
   end macro
end macro



macro dialogex? ¤class,¤title,¤x,¤y,¤cx,¤cy,¤style,¤exstyle,¤menu,¤helpID,¤fontname,¤fontsize,¤fontweight,¤italic,¤charset:1
   local items
   align 16
   dw 1,0FFFFh
   dd ¤helpID+0,¤exstyle+0,¤style+0
   dw items,¤x,¤y,¤cx,¤cy
   if ¤menu+0 = 0
     dw 0
   else if ¤menu eqtype ''
     du ¤menu,0
   else
     dw 0FFFFh,¤menu
   end if
   if ¤class+0 = 0
     dw 0
   else if ¤class eqtype ''
     du ¤class
   else
     dw 0FFFFh,¤class
   end if
   match any,¤title
     du ¤title ;,0 from common case below
   end match
              dw 0
   ;fontweight=0..1000; 0=default=400; bold = 700
   if ¤style and DS_SETFONT ;and or DS_SHELLFONT=(DS_SETFONT or DS_FIXEDSYS)
     match any,¤fontname
       dw ¤fontsize+0,¤fontweight+0
       db ¤italic+0,¤charset
       du ¤fontname,0
     else
       dw 8,400
       db ¤italic+0,¤charset
       du 'MS Sans Serif',0
     end match
   end if
   align 4
   dialog_items_counter = 0


   macro dialogitemex? class,titleorID,id,x,y,cx,cy,style,exstyle,helpID
     align 4
     dd helpID+0,exstyle+0,style or WS_CHILD
     dw x,y,cx,cy
     dd id ; for dialogitemex ID is word sign-extended to dword, however upper part can be any but most of window messages operate under lo word part only
     align 4; <-!must be here!!!
     match ,class
       dw 0
     else if class eqtype ''
       if class eq 'BUTTON'
         dw 0FFFFh,80h
       else if class eq 'EDIT'
         dw 0FFFFh,81h
       else if class eq 'STATIC'
         dw 0FFFFh,82h
       else if class eq 'LISTBOX'
         dw 0FFFFh,83h
       else if class eq 'SCROLLBAR'
         dw 0FFFFh,84h
       else if class eq 'COMBOBOX'
         dw 0FFFFh,85h
       else if class eq ''
         dw 0
       else
         du class
       end if
     else
       if (class and 1Fh) =10 | (class and 1Fh) =16 | (class-(class and 80h))>18h | class<0
         .err unsupported classID = class
       end if
       dw 0FFFFh,class
     end if
     if titleorID+0 = 0 ; no title no subitems
       dw 0
     else if titleorID eqtype '' ;title
       du titleorID,0
     else
       dw 0FFFFh,titleorID ; subitem: ID of ICO,BMP ... etc.
     end if
     dw 0
     dialog_items_counter = dialog_items_counter + 1

     purge dlgitmxtrdata?
     macro dlgitmxtrdata?
       local fin
       store fin-$:word at $-2

       macro end?.dlgitmxtrdata?
         fin = $
         purge end?.dlgitmxtrdata?,dlgitmxtrdata?
       end macro
     end macro
   end macro

   macro end?.dialog?
     items = dialog_items_counter
     purge dialogitemex?, end?.dialog?
   end macro
end macro    


started working on menu macros:
for now:
fasmg:
Code:
macro menu ex,helpID,extra&
  local items
  match ,ex
    dw 0
  else
    dw 1
  end match
  dw items -$-2

  match , extra ; extra preceding helpID, because helpID should be followed by dialogitem data, not other extras
  else
    iterate elem,extra
      if elem eqtype ''
        db elem,0
        align 4
      else
        dd elem
      end if
    end iterate
  end match

  match any,ex helpID ;helpID always is for menuex, and if helpID not empty force inclusion of it
    dd helpID+0
  end match
  items:
end macro    

It makes first dw 0,0 for standard menu and makes dw 1,4, dd 0 for extended menu
syntax:
Code:
menu ; for standard menu
menu ex ; for extended menu
menu ex,helpID ; too    


side effect of exploring menu resources on pictures below: realization menu in 2 or more bars is interest


Description:
Filesize: 13.47 KB
Viewed: 7681 Time(s)

MPAD2.jpg


Description:
Filesize: 12.9 KB
Viewed: 7681 Time(s)

MPAD.jpg



_________________
I don`t like to refer by "you" to one person.
My soul requires acronim "thou" instead.


Last edited by ProMiNick on 13 Aug 2017, 19:26; edited 1 time in total
Post 02 Aug 2017, 10:20
View user's profile Send private message Send e-mail Reply with quote
ProMiNick



Joined: 24 Mar 2012
Posts: 799
Location: Russian Federation, Sochi
ProMiNick 03 Aug 2017, 12:13
Exploring menu_v0 got this:
menu items are of 2 classes:
1. items with descendants, their MF_POPUP bit is set and they haven`t field for ID:
Code:
du flag or MF_POPUP, [caption,] 0     

in case such item is separator, that can be maked by to ways:
a. Indirect by defining caption as "" or as 0
b. Direct by specifing bit MF_SEPARATOR in flags
atleast 1 descendant must exist (always existed the last one descendant, i.e. that one which bit MF_END is set).
In case of separator - descendants exists but user will never access them.
2. Items without descendants, their MF_POPUP bit is cleared:
Code:
du flag and not MF_POPUP,ID, [caption,] 0    

this items can be separator too with zero caption or with direct flag.

example menu_v0 (used macro menu flom above post):
Code:
    resource_data RT_MENU,IDR_MENU,LANG_ENGLISH+SUBLANG_DEFAULT
      ;menu ex,,0,0,0
      menu
      ;dw 1,4
      ;dd 0; helpID
       du $0010,"First",0
         du $0200,IDM_NEW,"1st subitem, Let It be ""New""",0
         du $0800,$FF25,"sEpArAtOr , anycase you don`t see this text",0 ; direct separator
         du $0010,0 ; indirect separator with descendants
           du $0000,$1,"This item never be shown - it is separator child",0
           du $0080,$2,"This never shown too and this last child of separator - flag $80",0
         du $F60C,$3,"This is 4th subitem",0
         du $0010,"5th subitem with descendants",0
           du $0000,$FF26,0 ; this is separator
           du $0080,$4,"last sub of 5th subitem",0
         du $00A0,IDM_EXIT,"First ender, Let it be ""Exit""",0
       du $0070,"That is displayed in 2nd row at left",0
         du $0080,$6,"only 1 descendant",0
       du $0074,"3rd row at right, let it be ""Help""",0
         du $0080,IDM_ABOUT,"1st descendant ""&About...""",0
       du $0000,-1,"dummy item",0
       du $0080,-1,"dummy item",0
    end resource_data  
    


there is no any marker to define menu item other way than it is varied with MF_POPUP - that is true only for menu_v0 ofcourse.

I attached patient, I played with.
old menu_v0 powerfull. let`s see what menu_v1 can...
...I think still menu_v1 already implemented in fasm (maybe partialy) it will be more easier to explore it.


Description:
Download
Filename: example.asm
Filesize: 6.9 KB
Downloaded: 729 Time(s)

Post 03 Aug 2017, 12:13
View user's profile Send private message Send e-mail Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.