News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

presentation of my program

Started by Rockphorr, March 11, 2008, 11:04:10 AM

Previous topic - Next topic

Rockphorr

I wrote my small commander.

It's attached.

Just unpuck in some folder & use.

Use arrows and tab to control dialog windows.

Don't foget about Tab.

[attachment deleted by admin]
Strike while the iron is hot - Бей утюгом, пока он горячий

Rockphorr

New russian version now avaible here.
Strike while the iron is hot - Бей утюгом, пока он горячий

japheth


Thanks!

But: no possibility to view (F3) or edit (F4) a file?

Rockphorr

It is slow to write internal viewer/editor.
Call external user editor are forthcoming.

japheth do you know russian language??
Strike while the iron is hot - Бей утюгом, пока он горячий

0x401000

Sources are expected? Very interesting  :U

BlackVortex

Damn, it's 16-bit ... I can't run it on my x64 system  :eek


Rockphorr

Quote from: BlackVortex on November 01, 2009, 10:56:43 AM
Damn, it's 16-bit ... I can't run it on my x64 system  :eek

virtual enviroment like sun virtualbox are not solution for you, isn't it???
Strike while the iron is hot - Бей утюгом, пока он горячий

Rockphorr

Quote from: 0x401000 on November 01, 2009, 10:51:33 AM
Sources are expected? Very interesting  :U

source code are on site, that link is censored
Strike while the iron is hot - Бей утюгом, пока он горячий

BlackVortex

Quote from: Rockphorr on November 01, 2009, 12:15:14 PM
Quote from: BlackVortex on November 01, 2009, 10:56:43 AM
Damn, it's 16-bit ... I can't run it on my x64 system  :eek

virtual enviroment like sun virtualbox are not solution for you, isn't it???
Lol, I forgot about my virtual XP32. I tested it and it works fine but it's too few lines on the screen !

Reminded me of Norton Commander !   :toothy

Rockphorr

#9
If someone want correct or translate messages of my program  i can post incfiles that include all messages.
Please notify your language here.
Your name may by add to copyright page as translator.
Strike while the iron is hot - Бей утюгом, пока он горячий

Rockphorr

Hi !!
Can admins or moderators move this my topic to (The MASM Forum)\( Miscellaneous Forums)\( Miscellaneous Projects)

Thanx.
Strike while the iron is hot - Бей утюгом, пока он горячий

Rockphorr

Source code fragments


;=======[ SUBROUTINE ]============================
; Set current drive
;-------------------------------------------------
; Return:
;-------------------------------------------------
; Parameters:
; AL - drive leter
dos_fn\
= 0Eh
;-------------------------------------------------
@Service_public\
Set_Drive
push DX
push AX
;-----------------------------------------
IF @Alone
@Call_far\
wrap_bem,@AL_Case_Up_ID
ELSE
call AL_Case_Up
ENDIF
;-----------------------------------------
mov DL,'Z'
cmp DL,AL
jb _exit
;-----------------------------------------
mov DL,'A'
cmp AL,DL
jb _exit
;-----------------------------------------
cmp AH,':'
stc
jnz _exit
;-----------------------------------------
xchg AL,DL
sub DL,AL
mov AH,dos_fn
int 21h
clc
;-----------------------------------------
_exit:
pop AX
pop DX
@Service_end

;=======[ SUBROUTINE ]============================
; Get current drive
;-------------------------------------------------
; Return:
; AL = drive letter
; AH = ':'
;-------------------------------------------------
; Parameters:
dos_fn\
= 19h
;-------------------------------------------------
@Service_public\
Get_Drive
;-----------------------------------------
mov AH,dos_fn
int 21h
add AL,'A'
mov AH,':'
;-----------------------------------------
@Service_end

;=======[ SUBROUTINE ]============================
; Create list of drive leters
;-------------------------------------------------
; Return:
; AL = current drive
; AH = total drives
;-------------------------------------------------
; Parameters:
; ES:DI - seg:ofs(area of drive letters)
dos_fn\
= 0Eh
dos_fn_a\
= 19h
;-------------------------------------------------
@Service_public\
Create_Drive_List
push DI
push CX
push DX
;-----------------------------------------
call Create_floppy_list
mov CH,AL
mov CL,1+26-2
;-----------------------------------------
; CH - total floppy drives
; DH - current drive
;-----------------------------------------
_get:
IF @Alone
@Call_far\
storage_wos,@Get_Drive_ID
ELSE
call Get_Drive
ENDIF
;-----------------------------------------
cmp CL,1+26-2
je _first
cmp AL,DL
je _write
;-----------------------------------------
_next:
cmp CL,1
je _last
mov DL,1+26
sub DL,CL
add DL,'A'
;-----------------------------------------
; DL - drive of iteration
;-----------------------------------------
_set:
mov AL,DL
mov AH,':'
;-----------------------------------------
IF @Alone
@Call_far\
storage_wos,@Set_Drive_ID
ELSE
call Set_Drive
ENDIF
;-----------------------------------------
dec CL
jnz _get
jz _exit
;-----------------------------------------
_first:
mov DH,AL
jmp\
short _next
;-----------------------------------------
_last:
mov DL,DH
jmp\
short _set
;-----------------------------------------
_write:
stosb
inc CH
jmp\
short _next
;-----------------------------------------
_exit:
mov AH,CH
mov AL,DH
;-----------------------------------------
pop DX
pop CX
pop DI
@Service_end

кусочек кода отвечающий за вывод строки в прямоуголник на экране

;=======[ SUBROUTINE ]============================
; Write field text
;-------------------------------------------------
; Parameters:
; DS:SI - seg:ofs(Widget)
@Activity\; 0FFh is active, 000h is passive
= -08h
;-------------------------------------------------
@Routine_private\
Fld_Write_Text
push BX
push CX
push DX
push AX
;-----------------------------------------
mov CX,(Widget PTR [SI])\
.Widget_Total
stc
jcxz $exit
call Fld_Get_Capacity
mul AH
mov DX,AX
mov BX,(Widget PTR [SI])\
.Widget_Arrow
sub BX,(Widget PTR [SI])\
.Widget_Base
jc $less
cmp  BX,DX
jae $greater
jmp\
short $tail
;-----------------------------------------
$less:
add (Widget PTR [SI])\
.Widget_Base,BX
mov AX,BX
jmp\
short $tail
;-----------------------------------------
$greater:
mov AX,BX
sub AX,DX
inc AX
add (Widget PTR [SI])\
.Widget_Base,AX
;-----------------------------------------
$tail:
mov CX,DX
$loop:
push [BP+@Activity]
mov AX,DX
sub AX,CX
push AX
push (Widget PTR [SI])\
.Widget_Total
push (Widget PTR [SI])\
.Widget_Arrow
push (Widget PTR [SI])\
.Widget_Base
mov AX,(Widget PTR [SI])\
.Widget_Coords
push AX
call Fld_Write_Tail
loop $loop
clc
;-----------------------------------------
$exit:
pop AX
pop DX
pop CX
pop BX
@Routine_end

;=======[ SUBROUTINE ]============================
; Write tail
;-------------------------------------------------
; Parameters:
; DS:SI - seg:ofs(widget)
@Activity\
= 0Eh
@Ordinal\
= 0Ch
@Total\
= 0Ah
@Arrow\
= 8
@Base\
= 6
@Coords\
= 4
;-------------------------------------------------
@Routine_private\; my macro of std prologue
Fld_Write_Tail
push DS
push ES
push SI
push DI
push CX
push DX
;-----------------------------------------
call Fld_Seek_Style
;-----------------------------------------
mov AX,ES: (Field PTR [DI])\
.Field_Symbol_Quantity
or AL,AL
jz $exit
or AH,AH
jz $exit
;-----------------------------------------
lds SI,(Widget PTR [SI])\
.Widget_Stuff_Address
mov AX,ES: (Field PTR [DI])\
.Field_Coords
add [BP+@Coords],AL
add [BP+@Coords]+1,AH
;-----------------------------------------
mov AX,[BP+@Ordinal]
div ES: BYTE PTR (Field PTR [DI])\
.Field_Symbol_Quantity
xchg AL,AH
add AL,[BP+@Coords]
add AH,[BP+@Coords]+1
;-----------------------------------------
IF @Alone
@P_Locate\
AX
@Call_far\
field_dso,@Set_AX_Coords_ID
ELSE
@Locate\
AX
ENDIF
;-----------------------------------------
mov DX,[BP+@Ordinal]
add DX,[BP+@Base]
mov CX,[BP+@Activity]
jcxz $passive
cmp DX,[BP+@Arrow]
jne $active
call ES: (Field PTR [DI])\
.Field_Method_Cursor; set cur coord
;-----------------------------------------
$active:
mov AX,CS:Field_Palette
xchg AL,AH
jmp\
short $color
$passive:
mov AX,CS:Field_Palette
;-----------------------------------------
IF @Alone
@P_Color\
AX,Color
@Call_far\
field_dso,@Set_Color_ID
@Call_far\
field_affix,@Measure_String_ID
ELSE
@Color
call Measure_String
ENDIF
;-----------------------------------------
inc AX
cmp AX,[BP+@Total]
jbe $inside
mov AX,[BP+@Total]
;-----------------------------------------
$inside:
cmp DX,AX
jae $space
add SI,DX
lodsb
or AL,AL
jnz $write
;-----------------------------------------
$space:
mov AL,ES: (Field PTR [DI])\
.Field_Space_Symbol
;-----------------------------------------
$write:
IF @Alone
@P_Out_One\
AL
@Call_far\
field_dso,@Out_AL_Symbol_ID
ELSE
@Out_One
ENDIF
;-----------------------------------------
$exit:
pop DX
pop CX
pop DI
pop SI
pop ES
pop DS
@Routine_end 0Ch

Strike while the iron is hot - Бей утюгом, пока он горячий

Rockphorr

Thanx Hutch, he moved my topic here.

new russian version
Strike while the iron is hot - Бей утюгом, пока он горячий

dedndave

crashes under XP...
The NTVDM CPU has encountered an illegal instruction.
CS:0000 IP:0077 OP:f0 37 05 1b 02 Choose 'Close' to terminate the application.

that makes no sense   :P
why would the CS = 0 ?
some peculiarity with NTVDM, i guess

edit:
the opcodes they report disassemble to:
        lock    aaa
        add     ax,21Bh


Rockphorr

Quote from: dedndave on November 03, 2010, 10:28:00 AM
crashes under XP...
The NTVDM CPU has encountered an illegal instruction.
CS:0000 IP:0077 OP:f0 37 05 1b 02 Choose 'Close' to terminate the application.

that makes no sense   :P
why would the CS = 0 ?
some peculiarity with NTVDM, i guess

edit:
the opcodes they report disassemble to:
        lock    aaa
        add     ax,21Bh



path of this prog must be dos like style (does not use spaces, chars over 128 and length over 63 chars )

CS = 0 in table for all loading images in \swap subfolder at start up
when load is done i write them segs in table
i use old dos fns and error check is very sipmle and present not ever

on win 2003 - ok
Strike while the iron is hot - Бей утюгом, пока он горячий