/programs/network/telnet/trunk/telnet.asm |
---|
6,20 → 6,22 |
; |
use32 |
org 0x0 |
db 'MENUET01' ; header |
dd 0x01 ; header version |
dd START ; entry point |
dd I_END ; image size |
dd I_END+0x10000 ; required memory |
dd I_END+0x10000 ; esp |
dd 0x0 , 0x0 ; I_Param , I_Path |
org 0x0 |
db 'MENUET00' ; 8 byte id |
dd 38 ; required os |
dd START ; program start |
dd I_END ; program image size |
dd 0x100000 ; required amount of memory |
; esp = 0x7FFF0 |
dd 0x00000000 ; reserved=no extended header |
include 'lang.inc' |
include 'macros.inc' |
START: ; start of execution |
START: ; start of execution |
; Clear the screen memory |
mov eax, ' ' |
43,21 → 45,21 |
mov [socket_status], eax |
cmp eax, ebx |
je waitev |
je waitev |
call draw_window |
waitev: |
mov eax,23 ; wait here for event |
mov eax,23 ; wait here for event |
mov ebx,20 |
int 0x40 |
cmp eax,1 ; redraw request ? |
je red |
cmp eax,2 ; key in buffer ? |
je key |
cmp eax,3 ; button in buffer ? |
je button |
cmp eax,1 ; redraw request ? |
je red |
cmp eax,2 ; key in buffer ? |
je key |
cmp eax,3 ; button in buffer ? |
je button |
; any data from the socket? |
104,11 → 106,11 |
mov al, [telnetstate] |
cmp al, 0 |
je state0 |
je state0 |
cmp al, 1 |
je state1 |
je state1 |
cmp al, 2 |
je state2 |
je state2 |
jmp hd001 |
state0: |
137,7 → 139,7 |
ret |
hd001: |
cmp bl,13 ; BEGINNING OF LINE |
cmp bl,13 ; BEGINNING OF LINE |
jne nobol |
mov ecx,[pos] |
add ecx,1 |
153,7 → 155,7 |
jmp newdata |
nobol: |
cmp bl,10 ; LINE DOWN |
cmp bl,10 ; LINE DOWN |
jne nolf |
addx1: |
add [pos],dword 1 |
167,7 → 169,7 |
jmp cm1 |
nolf: |
cmp bl,8 ; BACKSPACE |
cmp bl,8 ; BACKSPACE |
jne nobasp |
mov eax,[pos] |
dec eax |
177,7 → 179,7 |
jmp newdata |
nobasp: |
cmp bl,15 ; CHARACTER |
cmp bl,15 ; CHARACTER |
jbe newdata |
mov eax,[pos] |
mov [eax+text],bl |
187,7 → 189,7 |
mov ebx,[scroll+4] |
imul ebx,80 |
cmp eax,ebx |
jb noeaxz |
jb noeaxz |
mov esi,text+80 |
mov edi,text |
mov ecx,ebx |
201,20 → 203,20 |
ret |
red: ; REDRAW WINDOW |
red: ; REDRAW WINDOW |
call draw_window |
jmp still |
key: ; KEY |
mov eax,2 ; send to modem |
key: ; KEY |
mov eax,2 ; send to modem |
int 0x40 |
mov ebx, [socket_status] |
cmp ebx, 4 ; connection open? |
jne still ; no, so ignore key |
cmp ebx, 4 ; connection open? |
jne still ; no, so ignore key |
shr eax,8 |
cmp eax,178 ; ARROW KEYS |
cmp eax,178 ; ARROW KEYS |
jne noaup |
mov al,'A' |
call arrow |
244,10 → 246,10 |
jmp still |
button: ; BUTTON |
button: ; BUTTON |
mov eax,17 |
int 0x40 |
cmp ah,1 ; CLOSE PROGRAM |
cmp ah,1 ; CLOSE PROGRAM |
jne noclose |
mov eax,53 |
258,7 → 260,7 |
mov eax,-1 |
int 0x40 |
noclose: |
cmp ah, 2 ; Set IP |
cmp ah, 2 ; Set IP |
jne notip |
mov [string_x], dword 78 |
271,9 → 273,9 |
ip1: |
inc esi |
cmp [esi],byte '0' |
jb ip2 |
jb ip2 |
cmp [esi],byte '9' |
jg ip2 |
jg ip2 |
imul eax,10 |
movzx ebx,byte [esi] |
sub ebx,48 |
291,7 → 293,7 |
jmp still |
notip: |
cmp ah, 3 ; set port |
cmp ah, 3 ; set port |
jne notport |
mov [string_x], dword 215 |
304,9 → 306,9 |
ip11: |
inc esi |
cmp [esi],byte '0' |
jb ip21 |
jb ip21 |
cmp [esi],byte '9' |
jg ip21 |
jg ip21 |
imul eax,10 |
movzx ebx,byte [esi] |
sub ebx,48 |
322,24 → 324,24 |
jmp still |
notport: |
cmp ah, 4 ; connect |
cmp ah, 4 ; connect |
jne notcon |
mov eax, [socket_status] |
cmp eax, 4 |
je still |
je still |
call connect |
jmp still |
notcon: |
cmp ah,5 ; disconnect |
cmp ah,5 ; disconnect |
jne notdiscon |
call disconnect |
jmp still |
notdiscon: ; Echo Toggle |
notdiscon: ; Echo Toggle |
cmp ah, 6 |
jne still |
380,7 → 382,7 |
pop bx |
mov al, [echo] |
cmp al, 0 |
je tm_001 |
je tm_001 |
push bx |
call handle_data |
413,17 → 415,17 |
connect: |
pusha |
mov ecx, 1000 ; local port starting at 1000 |
mov ecx, 1000 ; local port starting at 1000 |
getlp: |
inc ecx |
inc ecx |
push ecx |
mov eax, 53 |
mov ebx, 9 |
int 0x40 |
pop ecx |
cmp eax, 0 ; is this local port in use? |
jz getlp ; yes - so try next |
mov eax, 53 |
mov ebx, 9 |
int 0x40 |
pop ecx |
cmp eax, 0 ; is this local port in use? |
jz getlp ; yes - so try next |
mov eax,53 |
mov ebx,5 |
435,7 → 437,7 |
shl edx, 8 |
mov dl, [ip_address] |
mov esi, edx |
movzx edx, word [port] ; telnet port id |
movzx edx, word [port] ; telnet port id |
mov edi,1 ; active open |
int 0x40 |
mov [socket], eax |
459,13 → 461,31 |
mov ebx,1 |
int 0x40 |
xor eax,eax ; DRAW WINDOW |
mov eax,0 ; DRAW WINDOW |
mov ebx,100*65536+491 + 8 +15 |
mov ecx,100*65536+270 + 20 ; 20 for status bar |
mov edx,0x13000000 |
mov edi,labelt |
mov edx,[wcolor] |
add edx,0x02000000 |
mov esi,0x80557799 |
mov edi,0x00557799 |
int 0x40 |
mov eax,4 ; WINDOW LABEL |
mov ebx,8*65536+8 |
mov ecx,0x00ffffff |
mov edx,labelt |
mov esi,labellen-labelt |
int 0x40 |
mov eax,8 ; CLOSE BUTTON |
mov ebx,(491 + 20 -19)*65536+12 |
mov ecx,5*65536+12 |
mov edx,1 |
mov esi,0x557799 |
int 0x40 |
; draw status bar |
mov eax, 13 |
mov ebx, 4*65536+484 + 8 +15 |
473,7 → 493,7 |
mov edx, 0x00557799 |
int 0x40 |
mov eax,8 ; BUTTON 2: SET IP |
mov eax,8 ; BUTTON 2: SET IP |
mov ebx,4*65536+70 |
mov ecx,273*65536+12 |
mov esi, 0x00557799 |
480,7 → 500,7 |
mov edx,2 |
int 0x40 |
mov eax,4 ; Button text |
mov eax,4 ; Button text |
mov ebx,6*65536+276 |
mov ecx,0x00ffffff |
mov edx,setipt |
488,7 → 508,7 |
int 0x40 |
mov edi,ip_address ; display IP address |
mov edi,ip_address ; display IP address |
mov edx,78*65536+276 |
mov esi,0x00ffffff |
mov ebx,3*65536 |
499,9 → 519,9 |
add edx,6*4*65536 |
inc edi |
cmp edi,ip_address+4 |
jb ipdisplay |
jb ipdisplay |
mov eax,8 ; BUTTON 3: SET PORT |
mov eax,8 ; BUTTON 3: SET PORT |
mov ebx,173*65536+38 |
mov ecx,273*65536+12 |
mov edx,3 |
508,7 → 528,7 |
mov esi, 0x00557799 |
int 0x40 |
mov eax,4 ; Button text |
mov eax,4 ; Button text |
mov ebx,178*65536+276 |
mov ecx,0x00ffffff |
mov edx,setportt |
516,7 → 536,7 |
int 0x40 |
mov edx,216*65536+276 ; display port |
mov edx,216*65536+276 ; display port |
mov esi,0x00ffffff |
mov ebx,4*65536 |
mov eax,47 |
523,7 → 543,7 |
movzx ecx,word [port] |
int 0x40 |
mov eax,8 ; BUTTON 4: Connect |
mov eax,8 ; BUTTON 4: Connect |
mov ebx,250*65536+50 |
mov ecx,273*65536+12 |
mov esi, 0x00557799 |
530,7 → 550,7 |
mov edx,4 |
int 0x40 |
mov eax,4 ; Button text |
mov eax,4 ; Button text |
mov ebx,255*65536+276 |
mov ecx,0x00ffffff |
mov edx,cont |
538,7 → 558,7 |
int 0x40 |
mov eax,8 ; BUTTON 5: disconnect |
mov eax,8 ; BUTTON 5: disconnect |
mov ebx,303*65536+70 |
mov ecx,273*65536+12 |
mov edx,5 |
546,7 → 566,7 |
int 0x40 |
mov eax,4 ; Button text |
mov eax,4 ; Button text |
mov ebx,307*65536+276 |
mov ecx,0x00ffffff |
mov edx,dist |
554,22 → 574,22 |
int 0x40 |
mov esi,contlen-contt ; display connected status |
mov esi,contlen-contt ; display connected status |
mov edx, contt |
mov eax, [socket_status] |
cmp eax, 4 ; 4 is connected |
je pcon |
cmp eax, 4 ; 4 is connected |
je pcon |
mov esi,discontlen-discontt |
mov edx, discontt |
pcon: |
mov eax,4 ; status text |
mov eax,4 ; status text |
mov ebx,380*65536+276 |
mov ecx,0x00ffffff |
int 0x40 |
mov eax,8 ; BUTTON 6: echo |
mov eax,8 ; BUTTON 6: echo |
mov ebx,460*65536+50 |
mov ecx,273*65536+12 |
mov edx,6 |
585,7 → 605,7 |
mov esi,echoolen-echoot |
peo: |
mov eax,4 ; Button text |
mov eax,4 ; Button text |
mov ebx,463*65536+276 |
mov ecx,0x00ffffff |
int 0x40 |
626,7 → 646,7 |
; erase character |
pusha |
mov edx, 0 ; bg colour |
mov edx, 0 ; bg colour |
mov ecx, ebx |
add ecx, 26 |
shl ecx, 16 |
660,11 → 680,11 |
add esi,1 |
add eax,6 |
cmp eax,80*6 |
jb newletter |
jb newletter |
mov eax,0 |
add ebx,10 |
cmp ebx,24*10 |
jb newletter |
jb newletter |
popa |
ret |
690,11 → 710,11 |
int 0x40 |
shr eax,8 |
cmp eax,13 |
je read_done |
je read_done |
cmp eax,8 |
jnz nobsl |
cmp edi,string |
jz f11 |
jz f11 |
sub edi,1 |
mov [edi],byte '_' |
call print_text |
703,7 → 723,7 |
cmp eax,dword 31 |
jbe f11 |
cmp eax,dword 95 |
jb keyok |
jb keyok |
sub eax,32 |
keyok: |
mov [edi],al |
754,41 → 774,42 |
; DATA AREA |
telnetrep db 0xff,0xfc,0x00 |
telnetstate db 0 |
telnetrep db 0xff,0xfc,0x00 |
telnetstate db 0 |
string_length dd 16 |
string_x dd 200 |
string_y dd 60 |
string db '________________' |
string db '________________' |
tx_buff db 0, 10 |
ip_address db 001,002,003,004 |
port db 0,0 |
echo db 0 |
socket dd 0x0 |
socket_status dd 0x0 |
pos dd 80 * 1 |
scroll dd 1 |
dd 24 |
wcolor dd 0x000000 |
labelt db 'Telnet v0.1',0 |
setipt db 'IP Address: . . .' |
tx_buff db 0, 10 |
ip_address db 001,002,003,004 |
port db 0,0 |
echo db 0 |
socket dd 0x0 |
socket_status dd 0x0 |
pos dd 80 * 1 |
scroll dd 1 |
dd 24 |
wcolor dd 0x000000 |
labelt db 'Telnet v0.1' |
labellen: |
setipt db 'IP Address: . . .' |
setiplen: |
setportt db 'Port:' |
setportt db 'Port:' |
setportlen: |
cont db 'Connect' |
cont db 'Connect' |
conlen: |
dist db 'Disconnect' |
dist db 'Disconnect' |
dislen: |
contt db 'Connected' |
contt db 'Connected' |
contlen: |
discontt db 'Disconnected' |
discontt db 'Disconnected' |
discontlen: |
echot db 'Echo On' |
echot db 'Echo On' |
echolen: |
echoot db 'Echo Off' |
echoot db 'Echo Off' |
echoolen: |
/programs/network/terminal/trunk/terminal.asm |
---|
1,22 → 1,27 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
; |
; TERMINAL |
; |
; Compile with FASM for Menuet |
; |
use32 |
org 0x0 |
db 'MENUET01' ; header |
dd 0x01 ; header version |
dd START ; entry point |
dd I_END ; image size |
dd I_END+0x10000 ; required memory |
dd I_END+0x10000 ; esp |
dd 0x0 , 0x0 ; I_Param , I_Path |
org 0x0 |
db 'MENUET00' ; 8 byte id |
dd 38 ; required os |
dd START ; program start |
dd I_END ; program image size |
dd 0x100000 ; required amount of memory |
; esp = 0x7FFF0 |
dd 0x00000000 ; reserved=no extended header |
include 'lang.inc' |
include 'macros.inc' |
START: ; start of execution |
START: ; start of execution |
call draw_window |
24,18 → 29,18 |
still: |
mov eax,23 ; wait here for event |
mov eax,23 ; wait here for event |
mov ebx,20 |
int 0x40 |
cmp eax,1 ; redraw request ? |
je red |
cmp eax,2 ; key in buffer ? |
je key |
cmp eax,3 ; button in buffer ? |
je button |
cmp eax,1 ; redraw request ? |
je red |
cmp eax,2 ; key in buffer ? |
je key |
cmp eax,3 ; button in buffer ? |
je button |
cmp eax,16+4 |
je read_input |
je read_input |
jmp still |
48,13 → 53,13 |
int 0x40 |
pop ecx |
cmp bl,27 ; ESCAPE COMMAND |
cmp bl,27 ; ESCAPE COMMAND |
jne no_esc |
call esc_command |
jmp newdata |
no_esc: |
cmp bl,13 ; BEGINNING OF LINE |
cmp bl,13 ; BEGINNING OF LINE |
jne nobol |
mov ecx,[pos] |
add ecx,1 |
70,7 → 75,7 |
jmp newdata |
nobol: |
cmp bl,10 ; LINE DOWN |
cmp bl,10 ; LINE DOWN |
jne nolf |
addx1: |
add [pos],dword 1 |
84,7 → 89,7 |
jmp cm1 |
nolf: |
cmp bl,8 ; BACKSPACE |
cmp bl,8 ; BACKSPACE |
jne nobasp |
mov eax,[pos] |
dec eax |
94,7 → 99,7 |
jmp newdata |
nobasp: |
cmp bl,15 ; CHARACTER |
cmp bl,15 ; CHARACTER |
jbe newdata |
mov eax,[pos] |
call draw_data |
104,7 → 109,7 |
mov ebx,[scroll+4] |
imul ebx,80 |
cmp eax,ebx |
jb noeaxz |
jb noeaxz |
mov esi,text+80 |
mov edi,text |
mov ecx,ebx |
123,20 → 128,20 |
mov eax,11 |
int 0x40 |
cmp eax,16+4 |
je read_input |
je read_input |
call draw_text |
jmp still |
red: ; REDRAW WINDOW |
red: ; REDRAW WINDOW |
call draw_window |
jmp still |
key: ; KEY |
mov eax,2 ; send to modem |
key: ; KEY |
mov eax,2 ; send to modem |
int 0x40 |
shr eax,8 |
cmp eax,178 ; ARROW KEYS |
cmp eax,178 ; ARROW KEYS |
jne noaup |
mov al,'A' |
call arrow |
167,12 → 172,12 |
int 0x40 |
jmp still |
button: ; BUTTON |
button: ; BUTTON |
mov eax,17 |
int 0x40 |
cmp ah,1 ; CLOSE PROGRAM |
cmp ah,1 ; CLOSE PROGRAM |
jne noclose |
mov eax,45 ; FREE IRQ |
mov eax,45 ; FREE IRQ |
mov ebx,1 |
mov ecx,4 |
int 0x40 |
239,22 → 244,22 |
irqtable: |
dd 0x3f8 + 0x01000000 ; read port 0x3f8, byte |
dd 0 |
dd 0 |
dd 0 |
dd 0 |
dd 0 |
dd 0 |
dd 0 |
dd 0 |
dd 0 |
dd 0 |
dd 0 |
dd 0 |
dd 0 |
dd 0 |
dd 0 |
dd 0x3f8 + 0x01000000 ; read port 0x3f8, byte |
dd 0 |
dd 0 |
dd 0 |
dd 0 |
dd 0 |
dd 0 |
dd 0 |
dd 0 |
dd 0 |
dd 0 |
dd 0 |
dd 0 |
dd 0 |
dd 0 |
dd 0 |
269,7 → 274,7 |
mov edx,0x3ff |
int 0x40 |
mov eax,45 ; reserve irq 4 |
mov eax,45 ; reserve irq 4 |
mov ebx,0 |
mov ecx,4 |
int 0x40 |
336,13 → 341,29 |
mov ebx,1 |
int 0x40 |
mov eax,0 ; DRAW WINDOW |
mov eax,0 ; DRAW WINDOW |
mov ebx,100*65536+491 |
mov ecx,100*65536+270 |
mov edx,0x13000000 |
mov edi,labelt |
mov edx,[wcolor] |
add edx,0x02000000 |
mov esi,0x80557799 |
mov edi,0x00557799 |
int 0x40 |
mov eax,4 ; WINDOW LABEL |
mov ebx,8*65536+8 |
mov ecx,0x00ffffff |
mov edx,labelt |
mov esi,labellen-labelt |
int 0x40 |
mov eax,8 ; CLOSE BUTTON |
mov ebx,(491-19)*65536+12 |
mov ecx,5*65536+12 |
mov edx,1 |
mov esi,0x557799 |
int 0x40 |
xor eax,eax |
mov edi,text+80*30 |
mov ecx,80*30 /4 |
437,11 → 458,11 |
add esi,1 |
add eax,6 |
cmp eax,80*6 |
jb newletter |
jb newletter |
mov eax,0 |
add ebx,10 |
cmp ebx,24*10 |
jb newletter |
jb newletter |
popa |
ret |
482,7 → 503,7 |
call get_numbers |
cmp bl,'H' ; SET CURSOR POSITION |
cmp bl,'H' ; SET CURSOR POSITION |
jne no_cursor_position |
cmp [escnumbers],0 |
jne ncp1 |
498,7 → 519,7 |
jmp cmd_done |
no_cursor_position: |
cmp bl,'K' ; ERASE LINE |
cmp bl,'K' ; ERASE LINE |
jne no_erase_end_of_line |
cmp [escnumbers],0 |
jne no_end_line |
515,7 → 536,7 |
jne eeol |
jmp cmd_done |
no_end_line: |
cmp [escnumbers],1 ; BEGINNING OF LINE |
cmp [escnumbers],1 ; BEGINNING OF LINE |
jne no_beg_line |
mov ecx,[pos] |
ebol: |
533,7 → 554,7 |
no_beg_line: |
no_erase_end_of_line: |
cmp bl,'J' ; ERASE TO END OF SCREEN |
cmp bl,'J' ; ERASE TO END OF SCREEN |
jne no_erase_to_end_of_screen |
cmp [escnumbers],dword 0 |
jne no_erase_to_end_of_screen |
547,7 → 568,7 |
jmp cmd_done |
no_erase_to_end_of_screen: |
cmp bl,'r' ; SET SCROLL REGION |
cmp bl,'r' ; SET SCROLL REGION |
jne no_scroll_region |
mov eax,[escnumbers] |
dec eax |
557,7 → 578,7 |
jmp cmd_done |
no_scroll_region: |
cmp bl,'A' ; CURSOR UP |
cmp bl,'A' ; CURSOR UP |
jne no_cursor_up |
mov eax,[pos] |
sub eax,80 |
565,7 → 586,7 |
jmp cmd_done |
no_cursor_up: |
cmp bl,'C' ; CURSOR LEFT |
cmp bl,'C' ; CURSOR LEFT |
jne no_cursor_left |
mov eax,[pos] |
mov ebx,[escnumbers] |
574,7 → 595,7 |
call cmd_done |
no_cursor_left: |
cmp bl,'m' ; CHARACTER ATTRIBUTE |
cmp bl,'m' ; CHARACTER ATTRIBUTE |
jne no_char_attribute |
mov eax,[escnumbers] |
mov [attribute],eax |
581,7 → 602,7 |
jmp cmd_done |
no_char_attribute: |
cmp bl,'Z' ; TERMINAL TYPE |
cmp bl,'Z' ; TERMINAL TYPE |
jne no_terminal_type |
mov al,27 |
call to_modem |
709,18 → 730,19 |
; DATA AREA |
pos dd 80*10 |
irc_data dd 0x0 |
print db 0x0 |
attribute dd 0 |
scroll dd 1 |
dd 24 |
numtext db ' ' |
esccmd dd 0,0,0,0,0,0,0,0,0,0,0,0,0 |
escend db 'ZrhlABCDHfDME=>NmKJgincoyq',0 |
escnumbers dd 0,0,0,0,0 |
wcolor dd 0x000000 |
labelt db 'TERMINAL FOR MODEM IN COM1 0.03',0 |
pos dd 80*10 |
irc_data dd 0x0 |
print db 0x0 |
attribute dd 0 |
scroll dd 1 |
dd 24 |
numtext db ' ' |
esccmd dd 0,0,0,0,0,0,0,0,0,0,0,0,0 |
escend db 'ZrhlABCDHfDME=>NmKJgincoyq',0 |
escnumbers dd 0,0,0,0,0 |
wcolor dd 0x000000 |
labelt db 'TERMINAL FOR MODEM IN COM1 0.03' |
labellen: |
text: |
db ' ' |
/programs/network/tftpa/trunk/tftpa.asm |
---|
8,56 → 8,57 |
; |
use32 |
org 0x0 |
db 'MENUET01' ; header |
dd 0x01 ; header version |
dd START ; entry point |
dd I_END ; image size |
dd I_END+0x10000 ; required memory |
dd I_END+0x10000 ; esp |
dd 0x0 , 0x0 ; I_Param , I_Path |
org 0x0 |
db 'MENUET00' ; 8 byte id |
dd 38 ; required os |
dd START ; program start |
dd I_END ; program image size |
dd 0x100000 ; required amount of memory |
dd 0x00000000 ; reserved=no extended header |
include 'lang.inc' |
include 'macros.inc' |
delay dd 145 |
delay dd 145 |
wait_for dd 0x0 |
START: ; start of execution |
START: ; start of execution |
mov dword [prompt], p9 |
mov dword [promptlen], p9len - p9 |
call draw_window ; at first, draw the window |
call draw_window ; at first, draw the window |
still: |
mov eax,10 ; wait here for event |
mov eax,10 ; wait here for event |
int 0x40 |
cmp eax,1 ; redraw request ? |
jz red |
cmp eax,2 ; key in buffer ? |
jz key |
cmp eax,3 ; button in buffer ? |
jz button |
cmp eax,1 ; redraw request ? |
jz red |
cmp eax,2 ; key in buffer ? |
jz key |
cmp eax,3 ; button in buffer ? |
jz button |
jmp still |
red: ; redraw |
red: ; redraw |
call draw_window |
jmp still |
key: ; Keys are not valid at this part of the |
mov eax,2 ; loop. Just read it and ignore |
key: ; Keys are not valid at this part of the |
mov eax,2 ; loop. Just read it and ignore |
int 0x40 |
jmp still |
button: ; button |
mov eax,17 ; get id |
button: ; button |
mov eax,17 ; get id |
int 0x40 |
cmp ah,1 ; button id=1 ? |
cmp ah,1 ; button id=1 ? |
jnz noclose |
70,19 → 71,19 |
mov [socketNum], dword 0 |
mov eax,0xffffffff ; close this program |
mov eax,0xffffffff ; close this program |
int 0x40 |
noclose: |
cmp ah,2 ; copy file to local machine? |
cmp ah,2 ; copy file to local machine? |
jnz nocopyl |
mov dword [prompt], p5 |
mov dword [promptlen], p5len - p5 |
call draw_window ; |
call draw_window ; |
; Copy File from Remote Host to this machine |
call translateData ; Convert Filename & IP address |
call translateData ; Convert Filename & IP address |
mov edi, tftp_filename + 1 |
mov [edi], byte 0x01 ; setup tftp msg |
call copyFromRemote |
93,9 → 94,9 |
cmp ah,4 |
jz f1 |
jz f1 |
cmp ah,5 |
jz f2 |
jz f2 |
jmp nof12 |
f1: |
121,7 → 122,7 |
mov eax,10 |
int 0x40 |
cmp eax,2 |
jz fbu |
jz fbu |
jmp still |
fbu: |
mov eax,2 |
130,7 → 131,7 |
cmp eax,8 |
jnz nobs |
cmp edi,[addr] |
jz f11 |
jz f11 |
sub edi,1 |
mov [edi],byte ' ' |
call print_text |
139,7 → 140,7 |
cmp eax,dword 31 |
jbe f11 |
cmp eax,dword 95 |
jb keyok |
jb keyok |
sub eax,32 |
keyok: |
mov [edi],al |
311,12 → 312,12 |
mov eax, 3 |
int 0x40 |
mov ecx, eax |
shr ecx, 8 ; Set up the local port # with a random # |
shr ecx, 8 ; Set up the local port # with a random # |
; open socket |
mov eax, 53 |
mov ebx, 0 |
mov edx, 69 ; remote port |
mov edx, 69 ; remote port |
mov esi, [tftp_IP] ; remote IP ( in intenet format ) |
int 0x40 |
336,7 → 337,7 |
int 0x40 ; any more data? |
cmp eax, 0 |
jne cfr001 ; yes, so get it |
jne cfr001 ; yes, so get it |
; Now, request the file |
mov eax, 53 |
348,16 → 349,16 |
cfr002: |
mov eax,23 ; wait here for event |
mov ebx,1 ; Time out after 10ms |
mov eax,23 ; wait here for event |
mov ebx,1 ; Time out after 10ms |
int 0x40 |
cmp eax,1 ; redraw request ? |
je cfr003 |
cmp eax,2 ; key in buffer ? |
je cfr004 |
cmp eax,3 ; button in buffer ? |
je cfr005 |
cmp eax,1 ; redraw request ? |
je cfr003 |
cmp eax,2 ; key in buffer ? |
je cfr004 |
cmp eax,3 ; button in buffer ? |
je cfr005 |
; Any data to fetch? |
mov eax, 53 |
376,7 → 377,7 |
je cfr008 |
mov dword [prompt], p3 |
mov dword [promptlen], p3len - p3 |
call draw_window ; |
call draw_window ; |
cfr008: |
; we have data - this will be a tftp frame |
440,7 → 441,7 |
wait_more: |
mov eax,5 ; wait for correct timer position |
; to trigger new play block |
; to trigger new play block |
mov ebx,1 |
int 0x40 |
509,32 → 510,32 |
mov eax, 53 |
mov ebx, 3 |
mov ecx, [socketNum] |
int 0x40 ; read byte |
int 0x40 ; read byte |
mov eax, 53 |
mov ebx, 2 |
mov ecx, [socketNum] |
int 0x40 ; any more data? |
int 0x40 ; any more data? |
cmp eax, 0 |
jne cfrerr ; yes, so get it |
jne cfrerr ; yes, so get it |
jmp cfr006 ; close socket and close app |
jmp cfr006 ; close socket and close app |
cfr003: ; redraw request |
cfr003: ; redraw request |
call draw_window |
jmp cfr002 |
cfr004: ; key pressed |
mov eax,2 ; just read it and ignore |
cfr004: ; key pressed |
mov eax,2 ; just read it and ignore |
int 0x40 |
jmp cfr002 |
cfr005: ; button |
mov eax,17 ; get id |
cfr005: ; button |
mov eax,17 ; get id |
int 0x40 |
cmp ah,1 ; button id=1 ? |
cmp ah,1 ; button id=1 ? |
jne cfr002 ; If not, ignore. |
cfr006: |
546,7 → 547,7 |
mov [socketNum], dword 0 |
mov eax,-1 ; close this program |
mov eax,-1 ; close this program |
int 0x40 |
jmp $ |
562,7 → 563,7 |
mov dword [prompt], p4 |
mov dword [promptlen], p4len - p4 |
call draw_window ; |
call draw_window ; |
ret |
576,20 → 577,29 |
draw_window: |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,1 ; 1, start of draw |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,1 ; 1, start of draw |
int 0x40 |
; DRAW WINDOW |
mov eax,0 ; function 0 : define and draw window |
mov ebx,100*65536+230 ; [x start] *65536 + [x size] |
mov ecx,100*65536+170 ; [y start] *65536 + [y size] |
mov edx,0x13224466 ; color of work area RRGGBB |
mov edi,labelt |
; DRAW WINDOW |
mov eax,0 ; function 0 : define and draw window |
mov ebx,100*65536+230 ; [x start] *65536 + [x size] |
mov ecx,100*65536+170 ; [y start] *65536 + [y size] |
mov edx,0x03224466 ; color of work area RRGGBB |
mov esi,0x00334455 ; color of grab bar RRGGBB,8->color gl |
mov edi,0x00ddeeff ; color of frames RRGGBB |
int 0x40 |
mov eax,8 ; COPY BUTTON |
; WINDOW LABEL |
mov eax,4 ; function 4 : write text to window |
mov ebx,8*65536+8 ; [x start] *65536 + [y start] |
mov ecx,0x00ffffff ; color of text RRGGBB |
mov edx,labelt ; pointer to text beginning |
mov esi,labellen-labelt ; text length |
int 0x40 |
mov eax,8 ; COPY BUTTON |
mov ebx,20*65536+190 |
mov ecx,79*65536+15 |
mov edx,3 |
596,7 → 606,7 |
mov esi,0x557799 |
; int 0x40 |
mov eax,8 ; DELETE BUTTON |
mov eax,8 ; DELETE BUTTON |
mov ebx,20*65536+190 |
mov ecx,111*65536+15 |
mov edx,2 |
642,7 → 652,7 |
; Re-draw the screen text |
cld |
mov ebx,25*65536+35 ; draw info text with function 4 |
mov ebx,25*65536+35 ; draw info text with function 4 |
mov ecx,0xffffff |
mov edx,text |
mov esi,40 |
655,8 → 665,8 |
jnz newline |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,2 ; 2, end of draw |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,2 ; 2, end of draw |
int 0x40 |
ret |
664,11 → 674,11 |
; DATA AREA |
source db 'HEAT8M22.WAV ' |
source db 'HEAT8M22.WAV ' |
destination db '192.168.1.24 ' |
tftp_filename: times 15 + 9 db 0 |
tftp_filename: times 15 + 9 db 0 |
tftp_IP: dd 0 |
tftp_len: dd 0 |
688,11 → 698,14 |
db ' SERVER -> PLAY FILE ' |
db ' ' |
db ' ' |
db 'x' ; <- END MARKER, DONT DELETE |
db 'x <- END MARKER, DONT DELETE ' |
labelt db 'TFTP Wave Player',0 |
labelt: |
db 'TFTP Wave Player' |
labellen: |
prompt: dd 0 |
promptlen: dd 0 |
/programs/network/tftpc/trunk/tftpc.asm |
---|
1,56 → 1,60 |
; |
; TFTP Client |
; |
; Compile with FASM for Menuet |
; |
use32 |
org 0x0 |
db 'MENUET01' ; header |
dd 0x01 ; header version |
dd START ; entry point |
dd I_END ; image size |
dd I_END+0x10000 ; required memory |
dd I_END+0x10000 ; esp |
dd 0x0 , 0x0 ; I_Param , I_Path |
org 0x0 |
db 'MENUET00' ; 8 byte id |
dd 38 ; required os |
dd START ; program start |
dd I_END ; program image size |
dd 0x100000 ; required amount of memory |
dd 0x00000000 ; reserved=no extended header |
include 'lang.inc' |
include 'macros.inc' |
START: ; start of execution |
mov eax,40 ; Report events |
mov ebx,10000111b ; Stack 8 + defaults |
START: ; start of execution |
mov eax,40 ; Report events |
mov ebx,10000111b ; Stack 8 + defaults |
int 0x40 |
mov dword [prompt], p1 |
mov dword [promptlen], p1len - p1 |
call draw_window ; at first, draw the window |
call draw_window ; at first, draw the window |
still: |
mov eax,10 ; wait here for event |
mov eax,10 ; wait here for event |
int 0x40 |
cmp eax,1 ; redraw request ? |
jz red |
cmp eax,2 ; key in buffer ? |
jz key |
cmp eax,3 ; button in buffer ? |
jz button |
cmp eax,1 ; redraw request ? |
jz red |
cmp eax,2 ; key in buffer ? |
jz key |
cmp eax,3 ; button in buffer ? |
jz button |
jmp still |
red: ; redraw |
red: ; redraw |
call draw_window |
jmp still |
key: ; Keys are not valid at this part of the |
mov eax,2 ; loop. Just read it and ignore |
key: ; Keys are not valid at this part of the |
mov eax,2 ; loop. Just read it and ignore |
int 0x40 |
jmp still |
button: ; button |
mov eax,17 ; get id |
button: ; button |
mov eax,17 ; get id |
int 0x40 |
cmp ah,1 ; button id=1 ? |
cmp ah,1 ; button id=1 ? |
jnz noclose |
63,19 → 67,19 |
mov [socketNum], dword 0 |
mov eax,0xffffffff ; close this program |
mov eax,0xffffffff ; close this program |
int 0x40 |
noclose: |
cmp ah,2 ; copy file to local machine? |
cmp ah,2 ; copy file to local machine? |
jnz nocopyl |
mov dword [prompt], p5 |
mov dword [promptlen], p5len - p5 |
call draw_window ; |
call draw_window ; |
; Copy File from Remote Host to this machine |
call translateData ; Convert Filename & IP address |
call translateData ; Convert Filename & IP address |
mov edi, tftp_filename + 1 |
mov [edi], byte 0x01 ; setup tftp msg |
call copyFromRemote |
84,15 → 88,15 |
nocopyl: |
cmp ah,3 ; Copy file to host? |
cmp ah,3 ; Copy file to host? |
jnz nocopyh |
mov dword [prompt], p5 |
mov dword [promptlen], p5len - p5 |
call draw_window ; |
call draw_window ; |
; Copy File from this machine to Remote Host |
call translateData ; Convert Filename & IP address |
call translateData ; Convert Filename & IP address |
mov edi, tftp_filename + 1 |
mov [edi], byte 0x02 ; setup tftp msg |
call copyToRemote |
101,9 → 105,9 |
nocopyh: |
cmp ah,4 |
jz f1 |
jz f1 |
cmp ah,5 |
jz f2 |
jz f2 |
jmp nof12 |
f1: |
129,7 → 133,7 |
mov eax,10 |
int 0x40 |
cmp eax,2 |
jz fbu |
jz fbu |
jmp still |
fbu: |
mov eax,2 |
138,7 → 142,7 |
cmp eax,8 |
jnz nobs |
cmp edi,[addr] |
jz f11 |
jz f11 |
sub edi,1 |
mov [edi],byte ' ' |
call print_text |
147,7 → 151,7 |
cmp eax,dword 31 |
jbe f11 |
cmp eax,dword 95 |
jb keyok |
jb keyok |
sub eax,32 |
keyok: |
mov [edi],al |
318,18 → 322,18 |
; Get a random # for the local socket port # |
mov eax, 3 |
int 0x40 |
int 0x40 |
mov ecx, eax |
shr ecx, 8 ; Set up the local port # with a random # |
shr ecx, 8 ; Set up the local port # with a random # |
; open socket |
mov eax, 53 |
mov ebx, 0 |
mov edx, 69 ; remote port |
mov edx, 69 ; remote port |
mov esi, [tftp_IP] ; remote IP ( in intenet format ) |
int 0x40 |
mov [socketNum], eax |
mov [socketNum], eax |
; make sure there is no data in the socket - there shouldn't be.. |
337,15 → 341,15 |
mov eax, 53 |
mov ebx, 3 |
mov ecx, [socketNum] |
int 0x40 ; read byte |
int 0x40 ; read byte |
mov eax, 53 |
mov ebx, 2 |
mov ecx, [socketNum] |
int 0x40 ; any more data? |
int 0x40 ; any more data? |
cmp eax, 0 |
jne cfr001 ; yes, so get it |
jne cfr001 ; yes, so get it |
; Now, request the file |
mov eax, 53 |
356,15 → 360,15 |
int 0x40 |
cfr002: |
mov eax,10 ; wait here for event |
mov eax,10 ; wait here for event |
int 0x40 |
cmp eax,1 ; redraw request ? |
je cfr003 |
cmp eax,2 ; key in buffer ? |
je cfr004 |
cmp eax,3 ; button in buffer ? |
je cfr005 |
cmp eax,1 ; redraw request ? |
je cfr003 |
cmp eax,2 ; key in buffer ? |
je cfr004 |
cmp eax,3 ; button in buffer ? |
je cfr005 |
; Any data to fetch? |
mov eax, 53 |
383,7 → 387,7 |
je cfr008 |
mov dword [prompt], p3 |
mov dword [promptlen], p3len - p3 |
call draw_window ; |
call draw_window ; |
cfr008: |
; we have data - this will be a tftp frame |
392,12 → 396,12 |
mov eax, 53 |
mov ebx, 3 |
mov ecx, [socketNum] |
int 0x40 ; read byte |
int 0x40 ; read byte |
mov eax, 53 |
mov ebx, 3 |
mov ecx, [socketNum] |
int 0x40 ; read byte |
int 0x40 ; read byte |
pop eax |
; bl holds tftp opcode. Can only be 3 (data) or 5 ( error ) |
411,7 → 415,7 |
mov eax, 53 |
mov ebx, 3 |
mov ecx, [socketNum] |
int 0x40 ; read byte |
int 0x40 ; read byte |
mov [blockNumber], bl |
442,7 → 446,7 |
inc dword [fileposition] |
inc dword [filesize] |
jmp cfr007 |
jmp cfr007 |
no_more_data: |
482,32 → 486,32 |
mov eax, 53 |
mov ebx, 3 |
mov ecx, [socketNum] |
int 0x40 ; read byte |
int 0x40 ; read byte |
mov eax, 53 |
mov ebx, 2 |
mov ecx, [socketNum] |
int 0x40 ; any more data? |
int 0x40 ; any more data? |
cmp eax, 0 |
jne cfrerr ; yes, so get it |
jne cfrerr ; yes, so get it |
jmp cfr006 ; close socket and close app |
jmp cfr006 ; close socket and close app |
cfr003: ; redraw request |
cfr003: ; redraw request |
call draw_window |
jmp cfr002 |
cfr004: ; key pressed |
mov eax,2 ; just read it and ignore |
cfr004: ; key pressed |
mov eax,2 ; just read it and ignore |
int 0x40 |
jmp cfr002 |
cfr005: ; button |
mov eax,17 ; get id |
cfr005: ; button |
mov eax,17 ; get id |
int 0x40 |
cmp ah,1 ; button id=1 ? |
cmp ah,1 ; button id=1 ? |
jne cfr002 ; If not, ignore. |
cfr006: |
519,7 → 523,7 |
mov [socketNum], dword 0 |
mov eax,-1 ; close this program |
mov eax,-1 ; close this program |
int 0x40 |
jmp $ |
535,7 → 539,7 |
mov dword [prompt], p4 |
mov dword [promptlen], p4len - p4 |
call draw_window ; |
call draw_window ; |
ret |
561,7 → 565,7 |
mov dword [prompt], p6 |
mov dword [promptlen], p6len - p6 |
call draw_window ; |
call draw_window ; |
jmp ctr_exit |
filefound: |
583,18 → 587,18 |
; Get a random # for the local socket port # |
mov eax, 3 |
int 0x40 |
int 0x40 |
mov ecx, eax |
shr ecx, 8 ; Set up the local port # with a random # |
shr ecx, 8 ; Set up the local port # with a random # |
; First, open socket |
mov eax, 53 |
mov ebx, 0 |
mov edx, 69 ; remote port |
mov edx, 69 ; remote port |
mov esi, [tftp_IP] |
int 0x40 |
mov [socketNum], eax |
mov [socketNum], eax |
; write to socket ( request write file ) |
mov eax, 53 |
610,15 → 614,15 |
; or data from remote |
ctr001: |
mov eax,10 ; wait here for event |
mov eax,10 ; wait here for event |
int 0x40 |
cmp eax,1 ; redraw request ? |
je ctr003 |
cmp eax,2 ; key in buffer ? |
je ctr004 |
cmp eax,3 ; button in buffer ? |
je ctr005 |
cmp eax,1 ; redraw request ? |
je ctr003 |
cmp eax,2 ; key in buffer ? |
je ctr004 |
cmp eax,3 ; button in buffer ? |
je ctr005 |
; Any data in the UDP receive buffer? |
637,7 → 641,7 |
mov dword [prompt], p2 |
mov dword [promptlen], p2len - p2 |
call draw_window ; |
call draw_window ; |
; we have data - this will be the ack |
ctr002: |
644,17 → 648,17 |
mov eax, 53 |
mov ebx, 3 |
mov ecx, [socketNum] |
int 0x40 ; read byte - opcode |
int 0x40 ; read byte - opcode |
mov eax, 53 |
mov ebx, 3 |
mov ecx, [socketNum] |
int 0x40 ; read byte - opcode |
int 0x40 ; read byte - opcode |
mov eax, 53 |
mov ebx, 3 |
mov ecx, [socketNum] |
int 0x40 ; read byte - block (high byte) |
int 0x40 ; read byte - block (high byte) |
mov [blockNumber], bl |
661,7 → 665,7 |
mov eax, 53 |
mov ebx, 3 |
mov ecx, [socketNum] |
int 0x40 ; read byte - block (low byte ) |
int 0x40 ; read byte - block (low byte ) |
mov [blockNumber+1], bl |
669,13 → 673,13 |
mov eax, 53 |
mov ebx, 3 |
mov ecx, [socketNum] |
int 0x40 ; read byte (shouldn't have worked) |
int 0x40 ; read byte (shouldn't have worked) |
mov eax, 53 |
mov ebx, 2 |
mov ecx, [socketNum] |
int 0x40 ; any more data? |
int 0x40 ; any more data? |
cmp eax, 0 |
jne ctr0022 ; yes, so get it, and dump it |
699,7 → 703,7 |
cmp al, 0 |
jne ctr008 |
dec esi |
inc byte [esi] |
inc byte [esi] |
ctr008: |
; Move forward through the file |
755,20 → 759,20 |
jmp ctr001 |
ctr003: ; redraw |
ctr003: ; redraw |
call draw_window |
jmp ctr001 |
ctr004: ; key |
mov eax,2 ; just read it and ignore |
ctr004: ; key |
mov eax,2 ; just read it and ignore |
int 0x40 |
jmp ctr001 |
ctr005: ; button |
mov eax,17 ; get id |
ctr005: ; button |
mov eax,17 ; get id |
int 0x40 |
cmp ah,1 ; button id=1 ? |
cmp ah,1 ; button id=1 ? |
jne ctr001 |
; close socket |
779,7 → 783,7 |
mov [socketNum], dword 0 |
mov eax,-1 ; close this program |
mov eax,-1 ; close this program |
int 0x40 |
jmp $ |
792,7 → 796,7 |
mov dword [prompt], p4 |
mov dword [promptlen], p4len - p4 |
call draw_window ; |
call draw_window ; |
ctr_exit: |
ret |
807,19 → 811,29 |
draw_window: |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,1 ; 1, start of draw |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,1 ; 1, start of draw |
int 0x40 |
; DRAW WINDOW |
mov eax,0 ; function 0 : define and draw window |
mov ebx,100*65536+230 ; [x start] *65536 + [x size] |
mov ecx,100*65536+170 ; [y start] *65536 + [y size] |
mov edx,0x13224466 ; color of work area RRGGBB |
mov edi,labelt |
; DRAW WINDOW |
mov eax,0 ; function 0 : define and draw window |
mov ebx,100*65536+230 ; [x start] *65536 + [x size] |
mov ecx,100*65536+170 ; [y start] *65536 + [y size] |
mov edx,0x03224466 ; color of work area RRGGBB |
mov esi,0x00334455 ; color of grab bar RRGGBB,8->color gl |
mov edi,0x00ddeeff ; color of frames RRGGBB |
int 0x40 |
mov eax,8 ; COPY BUTTON |
; WINDOW LABEL |
mov eax,4 ; function 4 : write text to window |
mov ebx,8*65536+8 ; [x start] *65536 + [y start] |
mov ecx,0x00ffffff ; color of text RRGGBB |
mov edx,labelt ; pointer to text beginning |
mov esi,labellen-labelt ; text length |
int 0x40 |
mov eax,8 ; COPY BUTTON |
mov ebx,20*65536+190 |
mov ecx,79*65536+15 |
mov edx,2 |
826,7 → 840,7 |
mov esi,0x557799 |
int 0x40 |
mov eax,8 ; DELETE BUTTON |
mov eax,8 ; DELETE BUTTON |
mov ebx,20*65536+190 |
mov ecx,111*65536+15 |
mov edx,3 |
872,7 → 886,7 |
; Re-draw the screen text |
cld |
mov ebx,25*65536+35 ; draw info text with function 4 |
mov ebx,25*65536+35 ; draw info text with function 4 |
mov ecx,0xffffff |
mov edx,text |
mov esi,40 |
885,8 → 899,8 |
jnz newline |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,2 ; 2, end of draw |
mov eax,12 ; function 12:tell os about windowdraw |
mov ebx,2 ; 2, end of draw |
int 0x40 |
ret |
894,11 → 908,11 |
; DATA AREA |
source db 'KERNEL.ASM ' |
source db 'KERNEL.ASM ' |
destination db '192.168.1.23 ' |
tftp_filename: times 15 + 9 db 0 |
tftp_filename: times 15 + 9 db 0 |
tftp_IP: dd 0 |
tftp_len: dd 0 |
918,11 → 932,14 |
db ' COPY LOCAL -> HOST ' |
db ' ' |
db ' ' |
db 'x' ; <- END MARKER, DONT DELETE |
db 'x <- END MARKER, DONT DELETE ' |
labelt db 'TFTP Client',0 |
labelt: |
db 'TFTP Client' |
labellen: |
prompt: dd 0 |
promptlen: dd 0 |
/programs/network/ym/trunk/ym.asm |
---|
3,15 → 3,14 |
;B+ System header |
use32 |
org 0x0 |
db 'MENUET01' ; header |
dd 0x01 ; header version |
dd START ; entry point |
dd I_END ; image size |
dd I_END+0x10000 ; required memory |
dd I_END+0x10000 ; esp |
dd 0x0 , 0x0 ; I_Param , I_Path |
org 0x0 |
db 'MENUET01' |
dd 0x01 |
dd START |
dd I_END |
dd 0x100000 |
dd 0x7fff0 |
dd 0x0,0x0 |
;E:. |
include 'lang.inc' |
;B+ Definitions |
20,13 → 19,13 |
fr_sp equ 120 |
line_wid equ 45 |
fr_max_lines equ 17 |
fr_max_lines equ 17 |
;memory |
sys_colors equ I_END |
text_zone equ sys_colors+4*10 |
;friend_zone equ text_zone+45*25 ;uncom |
;friend_zone+32*fr_max_lines |
;friend_zone+32*fr_max_lines |
;E:. |
START: |
144,25 → 143,41 |
draw_window: |
;B+ Draw window |
mov ebx,1 |
mov eax,12 |
int 0x40 |
mov ebx,3 |
mov ecx,sys_colors |
mov edx,10*4 |
mov eax,48 |
int 0x40 |
mov ebx,1 |
mov eax,12 |
int 0x40 |
xor eax,eax ;DRAW WINDOW |
mov ebx,150*65536+h_sp |
mov ecx,100*65536+v_sp |
mov edx,[sys_colors+4*5] |
or edx,0x13000000 |
mov edi,header |
or edx,0x02000000 |
mov esi,[sys_colors+4*1] |
or esi,0x80000000 |
mov edi,[sys_colors+4*0] |
mov eax,0 |
int 0x40 |
mov ebx,8*65536+8 |
mov ecx,[sys_colors+4*4] |
or ecx,0x10000000 |
mov edx,caption |
mov esi,caption_end-caption |
mov eax,4 |
int 0x40 |
mov ebx,(400-19) shl 16 + 12 |
mov ecx,5 shl 16 + 12 |
mov edx,1 |
mov esi,[sys_colors+4*2] |
mov eax,8 |
int 0x40 |
;B+ Friend panel |
mov ebx,(h_sp-fr_sp) shl 16 + 3 |
mov ecx,20 shl 16 + v_sp-31 -56 |
731,7 → 746,7 |
.no_more: |
ret |
last_friend_place dd fr_e ;del |
last_friend_place dd fr_e ;del |
;last_friend_place dd friend_zone ;uncom |
find_friend: |
886,7 → 901,7 |
mov ecx,[sys_colors+4*5] |
mov edx,f_password |
mov esi,4 |
mov eax,4 |
mov eax,4 |
int 0x40 |
jmp still |
.unp dd username |
903,7 → 918,7 |
mov ecx,[sys_colors+4*8] |
mov edx,username |
mov esi,16 |
mov eax,4 |
mov eax,4 |
int 0x40 |
ret |
924,7 → 939,7 |
mov ecx,[sys_colors+4*5] |
mov edx,f_password |
mov esi,4 |
mov eax,4 |
mov eax,4 |
int 0x40 |
.next: |
948,7 → 963,7 |
.no_next: |
call show_password |
jmp still |
.no_still: |
.no_still: |
mov ebx,[.unp] |
mov [ebx],ah |
964,10 → 979,10 |
mov ecx,[sys_colors+4*8] |
mov edx,f_password |
mov esi,4 |
mov eax,4 |
mov eax,4 |
int 0x40 |
.end: |
ret |
ret |
f_password db '####' |
1003,7 → 1018,7 |
; al - friend user char |
; ----- |
; NOTE currenly don't show message if al='!' |
;Variables |
;usernave (zero terminated) |
;password (zero terminated) |
1021,7 → 1036,7 |
mov eax,0 |
ret |
disconnect: |
disconnect: |
;disconnect |
ret |
1034,25 → 1049,29 |
;B+ Test data ;del |
friend_zone: ;del |
db 1,'First:',0 ;del |
db 2,'hahaha',0 ;del |
db 3,'second',0 ;del |
db 3,'menuetos',0 ;del |
db 1,'Treti:',0 ;del |
db 2,'fourth',0 ;del |
fr_e db 0 ;del |
;del |
times 200 db 0 ;del |
;del |
last_friend_line dd 0x6 ;del |
header db 'Messenger (Yahoo Compatible)',0 |
friend_zone: ;del |
db 1,'First:',0 ;del |
db 2,'hahaha',0 ;del |
db 3,'second',0 ;del |
db 3,'menuetos',0 ;del |
db 1,'Treti:',0 ;del |
db 2,'fourth',0 ;del |
fr_e db 0 ;del |
;del |
times 200 db 0 ;del |
;del |
last_friend_line dd 0x6 ;del |
;E:. ;del |
;B+ Data area |
;caption db 'Yahoo Messanger for MenuetOS' |
caption db 'Messinger (Yahoo Compatible)' |
caption_end: |
;User / Password |
login_txt db 'STATUS: SESSION: ___.___.___.___' |
;VISIBLE |
;HIDDEN |
;VISIBLE |
;HIDDEN |
login_txt_end: |
user_txt db 'USER ID ->' |
user_txt_end: |