Subversion Repositories Kolibri OS

Rev

Rev 109 | Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ;;                                                   ;;
  3. ;;    POP CLIENT for MenuetOS                        ;;
  4. ;;    - Modified from IRC client                     ;;
  5. ;;                                                   ;;
  6. ;;    License: GPL / See file COPYING for details    ;;
  7. ;;    Copyright 2002 (c) Ville Turjanmaa             ;;
  8. ;;                                                   ;;
  9. ;;    Compile with FASM for Menuet                   ;;
  10. ;;                                                   ;;
  11. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  12.  
  13. version equ '0.1'
  14.  
  15. use32
  16.  
  17.                 org     0x0
  18.  
  19.                 db      'MENUET01'              ; 8 byte id
  20.                 dd      0x01                    ; required os
  21.                 dd      START                   ; program start
  22.                 dd      I_END                   ; program image size
  23.                 dd      0x200000                ; required amount of memory
  24.                 dd      0xffff0
  25.                 dd      0,0
  26.  
  27. START:                          ; start of execution
  28.  
  29.     mov  [file_start],0x100000
  30.  
  31.     mov  eax,70
  32.     mov  ebx,filel
  33.     int  0x40
  34.  
  35.     test eax,eax
  36.     jz   @f
  37.     cmp  eax,6
  38.     jnz  notfound
  39. @@:
  40.     add  [file_start],ebx
  41.   notfound:
  42.  
  43.     mov  edi,I_END
  44.     mov  ecx,60*120
  45.     mov  al,32
  46.     cld
  47.     rep  stosb
  48.  
  49.     mov  eax,[rxs]
  50.     imul eax,11
  51.     mov  [pos],eax
  52.  
  53.     mov  ebp,0
  54.     mov  edx,I_END
  55.     call draw_window            ; at first, draw the window
  56.  
  57. still:
  58.  
  59.     mov  eax,5
  60.     mov  ebx,1
  61.     int  0x40
  62.  
  63.     mov  eax,11                 ; wait here for event
  64.     int  0x40
  65.  
  66.     cmp  eax,1                  ; redraw
  67.     je   redraw
  68.     cmp  eax,2                  ; key
  69.     je   key
  70.     cmp  eax,3                  ; button
  71.     je   button
  72.  
  73.     cmp  [I_END+120*60],byte 1
  74.     jne  no_main_update
  75.     mov  [I_END+120*60],byte 0
  76.     mov  edx,I_END
  77.     call draw_server_data
  78.   no_main_update:
  79.  
  80.     cmp  [server_active],0
  81.     je   noread
  82.     call read_incoming_data
  83.   noread:
  84.  
  85.     call print_status
  86.  
  87.     cmp  [status],4
  88.     je   send_request
  89.  
  90.     jmp  still
  91.  
  92.  
  93. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  94. ;;
  95. ;;  Save the fetched mails
  96. ;;
  97.  
  98.  
  99. save_file:
  100.  
  101.    pusha
  102.  
  103.    mov  ebx,files
  104.    mov  eax,[file_start]
  105.    sub  eax,0x100000
  106.    mov  [ebx+12],eax
  107.  
  108.    mov  eax,70
  109.    int  0x40
  110.  
  111.    popa
  112.  
  113.    ret
  114.  
  115.  
  116. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  117. ;;
  118. ;;  Send user id/passwd/mailrq
  119. ;;
  120.  
  121.  
  122. send_request:
  123.  
  124.     inc  [mcounter]
  125.  
  126.     cmp  [mcounter],1000
  127.     jbe  no_send
  128.  
  129.     mov  eax,[ccounter]
  130.     imul  eax,32
  131.     add  eax,getmail
  132.     mov  esi,eax
  133.  
  134.     inc  [ccounter]
  135.  
  136.     mov  edx,32
  137.  
  138.     cmp  [ccounter],1
  139.     jne  no1
  140.     mov  edx,5+2
  141.     add  edx,[l2]
  142.   no1:
  143.  
  144.     cmp  [ccounter],2
  145.     jne  no2
  146.     mov  edx,5+2
  147.     add  edx,[l3]
  148.   no2:
  149.  
  150.     mov  eax,53
  151.     mov  ebx,7
  152.     mov  ecx,[socket]
  153.     int  0x40
  154.     mov  [mcounter],0
  155.  
  156.     cmp  [esi],dword 'quit'
  157.     je   close_fetch
  158.  
  159.  
  160.   no_send:
  161.  
  162.     jmp  still
  163.  
  164.  
  165. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  166. ;;
  167. ;;  Close connection to server
  168. ;;
  169.  
  170.  
  171. close_fetch:
  172.  
  173.     mov  eax,53
  174.     mov  ebx,7
  175.     mov  ecx,[socket]
  176.     mov  edx,14
  177.     mov  esi,quitc
  178.     int  0x40
  179.     mov  [mcounter],0
  180.  
  181.     mov  eax,5
  182.     mov  ebx,150
  183.     int  0x40
  184.  
  185.     call read_incoming_data
  186.  
  187.     mov  eax,53
  188.     mov  ebx,8
  189.     mov  ecx,[socket]
  190.     int  0x40
  191.  
  192.     mov  eax,5
  193.     mov  ebx,2
  194.     int  0x40
  195.  
  196.     mov  eax,53
  197.     mov  ebx,8
  198.     mov  ecx,[socket]
  199.     int  0x40
  200.  
  201.     mov  [server_active],0
  202.  
  203.     jmp  still
  204.  
  205.  
  206. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  207. ;;
  208. ;;  User input processing
  209. ;;
  210.  
  211.  
  212. redraw:                         ; redraw
  213.  
  214.     call draw_window
  215.     jmp  still
  216.  
  217.  
  218. key:
  219.  
  220.     mov  eax,2
  221.     int  0x40
  222.  
  223.     jmp  still
  224.  
  225.  
  226. button:                         ; button
  227.  
  228.     mov  eax,17                 ; get id
  229.     int  0x40
  230.  
  231.     cmp  ah,60
  232.     jne  no_open
  233.         mov     eax, 70
  234.         mov     ebx, tinypad_start
  235.         int     0x40
  236.     jmp  still
  237.   no_open:
  238.  
  239.     cmp  ah,1                   ; close program
  240.     jne  noclose
  241.     mov  eax,-1
  242.     int  0x40
  243.   noclose:
  244.  
  245.     cmp  ah,51
  246.     je   read_string
  247.     cmp  ah,52
  248.     je   read_string
  249.     cmp  ah,53
  250.     je   read_string
  251.  
  252.     call socket_commands
  253.  
  254.     jmp  still
  255.  
  256.  
  257. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  258. ;;
  259. ;;  Socket open & close
  260. ;;
  261.  
  262. socket_commands:
  263.  
  264.     cmp  ah,22       ; open socket
  265.     jnz  tst3
  266.  
  267.     mov  [server_active],1
  268.  
  269.     mov  [mcounter],900
  270.     mov  [ccounter],0
  271.  
  272.     mov  eax,3
  273.     int  0x40
  274.  
  275.     mov  eax,3
  276.     int  0x40
  277.     mov  ecx,eax
  278.     and  ecx,0xffff
  279.  
  280.     mov  eax,53
  281.     mov  ebx,5
  282.     mov  edx,110
  283.     mov  esi,dword [ip]
  284.     mov  edi,1
  285.     int  0x40
  286.     mov  [socket], eax
  287.  
  288.     ret
  289.   tst3:
  290.  
  291.  
  292.     cmp  ah,24     ; close socket
  293.     jnz  no_24
  294.     mov  eax,53
  295.     mov  ebx,8
  296.     mov  ecx,[socket]
  297.     int  0x40
  298.     mov  [header_sent],0
  299.     mov  [mail_rp],0
  300.     mov  [server_active],0
  301.  
  302.     ret
  303.   no_24:
  304.  
  305.     ret
  306.  
  307.  
  308.  
  309. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  310. ;;
  311. ;;  Display connection status
  312. ;;
  313.  
  314. old_status dd 0x0
  315.  
  316. print_status:
  317.  
  318.     pusha
  319.  
  320.     mov  eax,53
  321.     mov  ebx,6
  322.     mov  ecx,[socket]
  323.     int  0x40
  324.  
  325.     mov  [status],eax
  326.  
  327.     cmp  eax,[old_status]
  328.     je   nopr
  329.  
  330.     mov  [old_status],eax
  331.  
  332.     push eax
  333.  
  334.     mov  eax,13
  335.     mov  ebx,200*65536+30
  336.     mov  ecx,160*65536+10
  337.     mov  edx,0xffffff
  338.     int  0x40
  339.  
  340.     pop  ecx
  341.  
  342.     cmp  [server_active],1
  343.     jne  nopr
  344.  
  345.     mov  eax,47
  346.     mov  ebx,3*65536
  347.     mov  edx,200*65536+160
  348.     mov  esi,0x000000
  349.     int  0x40
  350.  
  351.   nopr:
  352.  
  353.     popa
  354.  
  355.     ret
  356.  
  357.  
  358.  
  359.  
  360.  
  361. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  362. ;;
  363. ;;  Read data from server
  364. ;;
  365.  
  366.  
  367. read_incoming_data:
  368.  
  369.     pusha
  370.  
  371.   read_new_byte:
  372.  
  373.     call read_incoming_byte
  374.     cmp  ecx,-1
  375.     je   no_data_in_buffer
  376.  
  377.     mov  eax,[file_start]
  378.     mov  [eax],bl
  379.     inc  [file_start]
  380.  
  381.     cmp  bl,10
  382.     jne  no_start_command
  383.     mov  [cmd],1
  384.   no_start_command:
  385.  
  386.     cmp  bl,13
  387.     jne  no_end_command
  388.     mov  eax,[cmd]
  389.     mov  [eax+command-2],byte 0
  390.     call save_file
  391.     call analyze_data
  392.     mov  edi,command
  393.     mov  ecx,250
  394.     mov  eax,0
  395.     cld
  396.     rep  stosb
  397.     mov  [cmd],0
  398.   no_end_command:
  399.  
  400.     mov  eax,[cmd]
  401.     cmp  eax,250
  402.     jge  still
  403.  
  404.     mov  [eax+command-2],bl
  405.     inc  [cmd]
  406.  
  407.     jmp  read_new_byte
  408.  
  409.   no_data_in_buffer:
  410.  
  411.     popa
  412.  
  413.     ret
  414.  
  415.  
  416. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  417. ;;
  418. ;;  Read user input for ip/user/passwd
  419. ;;
  420.  
  421.  
  422. read_string:
  423.  
  424.     shr  eax,8
  425.     sub  eax,51
  426.     mov  ebx,eax
  427.     imul eax,12
  428.     add  eax,181
  429.  
  430.     mov  [len],ebx
  431.     shl  [len],2
  432.     add  [len],l1
  433.  
  434.     imul ebx,50
  435.     add  ebx,input1
  436.  
  437.     mov  [addr],ebx
  438.     mov  [ya],eax
  439.  
  440.     mov  edi,[addr]
  441.     mov  eax,0
  442.     mov  ecx,30
  443.     cld
  444.     rep  stosb
  445.  
  446.     call print_input_text
  447.  
  448.     mov  edi,[addr]
  449.  
  450.   f11:
  451.     mov  eax,10
  452.     int  0x40
  453.     cmp  eax,2
  454.     jne  read_done
  455.     mov  eax,2
  456.     int  0x40
  457.     shr  eax,8
  458.     cmp  eax,13
  459.     je   read_done
  460.     cmp  eax,8
  461.     jnz  nobsl
  462.     cmp  edi,[addr]
  463.     jz   f11
  464.     sub  edi,1
  465.     mov  [edi],byte 32
  466.     call print_text
  467.     jmp  f11
  468.   nobsl:
  469.     mov  [edi],al
  470.  
  471.     call print_input_text
  472.  
  473.     add  edi,1
  474.     mov  esi,[addr]
  475.     add  esi,30
  476.     cmp  esi,edi
  477.     jnz  f11
  478.  
  479.   read_done:
  480.  
  481.     push edi
  482.  
  483.     mov  ecx,40
  484.     mov  eax,32
  485.     cld
  486.     rep  stosb
  487.  
  488.     call print_input_text
  489.  
  490.     pop  edi
  491.     sub  edi,[addr]
  492.     mov  eax,[len]
  493.     mov  [eax],edi
  494.  
  495.     cmp  [len],l1
  496.     jne  noip
  497.     mov  esi,input1
  498.     mov  edi,ip_text+15
  499.     mov  ecx,16
  500.     cld
  501.     rep  movsb
  502.     call ip_set
  503.    noip:
  504.  
  505.     cmp  [len],l2
  506.     jne  nol2
  507.     mov  esi,input2
  508.     mov  edi,l2_text+15
  509.     mov  ecx,22
  510.     cld
  511.     rep  movsb
  512.     mov  esi,input2
  513.     mov  edi,getmail+5
  514.     mov  ecx,[l2]
  515.     cld
  516.     rep  movsb
  517.     mov  al,13
  518.     stosb
  519.     mov  al,10
  520.     stosb
  521.    nol2:
  522.  
  523.     cmp  [len],l3
  524.     jne  nol3
  525.     mov  esi,input3
  526.     mov  edi,getmail+32+5
  527.     mov  ecx,[l3]
  528.     cld
  529.     rep  movsb
  530.     mov  al,13
  531.     stosb
  532.     mov  al,10
  533.     stosb
  534.    nol3:
  535.  
  536.     call draw_window
  537.  
  538.     jmp  still
  539.  
  540.  
  541.  
  542. print_input_text:
  543.  
  544.     pusha
  545.  
  546.     mov  eax,13
  547.     mov  ebx,95*65536+23*6
  548.     mov  ecx,[ya]
  549.     shl  ecx,16
  550.     mov  cx,9
  551.     mov  edx,0xffffff
  552.     int  0x40
  553.  
  554.     cmp  [len],l3
  555.     je   noprt
  556.  
  557.     mov  eax,4
  558.     mov  edx,[addr]
  559.     mov  ebx,95*65536
  560.     add  ebx,[ya]
  561.     mov  ecx,0x000000
  562.     mov  esi,23
  563.     int  0x40
  564.  
  565.   noprt:
  566.  
  567.     popa
  568.     ret
  569.  
  570.  
  571. ip_set:
  572.  
  573.     mov   esi,input1-1
  574.     mov   edi,ip
  575.     xor   eax,eax
  576.    ip1:
  577.     inc   esi
  578.     cmp   [esi],byte '0'
  579.     jb    ip2
  580.     cmp   [esi],byte '9'
  581.     jg    ip2
  582.     imul  eax,10
  583.     movzx ebx,byte [esi]
  584.     sub   ebx,48
  585.     add   eax,ebx
  586.     jmp   ip1
  587.    ip2:
  588.     mov   [edi],al
  589.     xor   eax,eax
  590.     inc   edi
  591.     cmp   edi,ip+3
  592.     jbe   ip1
  593.     ret
  594.    no_read_ip:
  595.  
  596.     ret
  597.  
  598.  
  599. analyze_data:
  600.  
  601.     pusha
  602.  
  603.     mov  [text_start],I_END
  604.     mov  ecx,[rxs]
  605.     imul ecx,11
  606.     mov  [pos],ecx
  607.  
  608.     mov  bl,13
  609.     call print_character
  610.     mov  bl,10
  611.     call print_character
  612.  
  613.     cmp  [cmd],2
  614.     jbe  nott
  615.     mov  ecx,[cmd]
  616.     sub  ecx,2
  617.     mov  esi,command+0
  618.   newcmdc:
  619.     mov  bl,[esi]
  620.     call print_character
  621.     inc  esi
  622.     loop newcmdc
  623.  
  624.    nott:
  625.  
  626.     mov   edx,I_END
  627.     call  draw_server_data
  628.  
  629.   cmd_len_ok:
  630.  
  631.     cmp  [command],dword '-ERR'
  632.     je   close_fetch
  633.  
  634.     cmp  [command],word '+O'
  635.     jne  nook
  636.     mov  [mcounter],990
  637.   nook:
  638.  
  639.     popa
  640.  
  641.     ret
  642.  
  643.  
  644.  
  645. draw_data:
  646.  
  647.     push eax
  648.  
  649.     add  eax,[text_start]
  650.     mov  [eax],bl
  651.  
  652.     pop  eax
  653.     ret
  654.  
  655.  
  656.  
  657. print_text:
  658.  
  659.     pusha
  660.  
  661.     mov  ecx,command-2
  662.     add  ecx,[cmd]
  663.  
  664.   ptr2:
  665.     mov  bl,[eax]
  666.     cmp  bl,dl
  667.     je   ptr_ret
  668.     cmp  bl,0
  669.     je   ptr_ret
  670.     call print_character
  671.     inc  eax
  672.     cmp  eax,ecx
  673.     jbe  ptr2
  674.  
  675.   ptr_ret:
  676.  
  677.     mov  eax,[text_start]
  678.     mov  [eax+120*60],byte 1
  679.  
  680.     popa
  681.     ret
  682.  
  683.  
  684.  
  685. print_character:
  686.  
  687.     pusha
  688.  
  689.     cmp  bl,13     ; line beginning
  690.     jne  nobol
  691.     mov  ecx,[pos]
  692.     add  ecx,1
  693.   boll1:
  694.     sub  ecx,1
  695.     mov  eax,ecx
  696.     xor  edx,edx
  697.     mov  ebx,[rxs]
  698.     div  ebx
  699.     cmp  edx,0
  700.     jne  boll1
  701.     mov  [pos],ecx
  702.     jmp  newdata
  703.   nobol:
  704.  
  705.     cmp  bl,10     ; line down
  706.     jne  nolf
  707.    addx1:
  708.     add  [pos],dword 1
  709.     mov  eax,[pos]
  710.     xor  edx,edx
  711.     mov  ecx,[rxs]
  712.     div  ecx
  713.     cmp  edx,0
  714.     jnz  addx1
  715.     mov  eax,[pos]
  716.     jmp  cm1
  717.   nolf:
  718.   no_lf_ret:
  719.  
  720.  
  721.     cmp  bl,15    ; character
  722.     jbe  newdata
  723.  
  724.     mov  eax,[irc_data]
  725.     shl  eax,8
  726.     mov  al,bl
  727.     mov  [irc_data],eax
  728.  
  729.     mov  eax,[pos]
  730.     call draw_data
  731.  
  732.     mov  eax,[pos]
  733.     add  eax,1
  734.   cm1:
  735.     mov  ebx,[scroll+4]
  736.     imul ebx,[rxs]
  737.     cmp  eax,ebx
  738.     jb   noeaxz
  739.  
  740.     mov  esi,[text_start]
  741.     add  esi,[rxs]
  742.  
  743.     mov  edi,[text_start]
  744.     mov  ecx,ebx
  745.     cld
  746.     rep  movsb
  747.  
  748.     mov  esi,[text_start]
  749.     mov  ecx,[rxs]
  750.     imul ecx,61
  751.     add  esi,ecx
  752.  
  753.     mov  edi,[text_start]
  754.     mov  ecx,[rxs]
  755.     imul ecx,60
  756.     add  edi,ecx
  757.     mov  ecx,ebx
  758.     cld
  759.     rep  movsb
  760.  
  761.     mov  eax,ebx
  762.     sub  eax,[rxs]
  763.   noeaxz:
  764.     mov  [pos],eax
  765.  
  766.   newdata:
  767.  
  768.     mov  eax,[text_start]
  769.     mov  [eax+120*60],byte 1
  770.  
  771.     popa
  772.     ret
  773.  
  774.  
  775.  
  776. read_incoming_byte:
  777.  
  778.     mov  eax, 53
  779.     mov  ebx, 2
  780.     mov  ecx, [socket]
  781.     int  0x40
  782.  
  783.     mov  ecx,-1
  784.  
  785.     cmp  eax,0
  786.     je   no_more_data
  787.  
  788.     mov  eax, 53
  789.     mov  ebx, 3
  790.     mov  ecx, [socket]
  791.     int  0x40
  792.  
  793.     mov  ecx,0
  794.  
  795.   no_more_data:
  796.  
  797.     ret
  798.  
  799.  
  800. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  801. ;;
  802. ;;  Window definitions
  803. ;;
  804.  
  805.  
  806.  
  807. draw_window:
  808.  
  809.     pusha
  810.  
  811.     mov  eax,12
  812.     mov  ebx,1
  813.     int  0x40
  814.  
  815.     mov  eax,0                     ; draw window
  816.     mov  ebx,5*65536+435
  817.     mov  ecx,5*65536+232
  818.     mov  edx,0x13ffffff
  819.     mov  edi,labelt
  820.     int  0x40
  821.  
  822.     mov  [old_status],300
  823.  
  824.     mov  eax,8                     ; button: open socket
  825.     mov  ebx,23*65536+22
  826.     mov  ecx,155*65536+10
  827.     mov  edx,22
  828.     mov  esi,0x44cc44
  829.     int  0x40
  830.  
  831. ;    mov  eax,8                     ; button: close socket
  832.     mov  ebx,295*65536+22
  833.     mov  ecx,155*65536+10
  834.     mov  edx,24
  835.     mov  esi,0xcc4444
  836.     int  0x40
  837.  
  838. ;    mov  eax,8                     ; button: text entries
  839.     mov  ebx,243*65536+8
  840.     mov  ecx,180*65536+8
  841.     mov  edx,51
  842.     mov  esi,0x4488dd
  843.   newi:
  844.     int  0x40
  845.     inc  edx
  846.     add  ecx,12*65536
  847.     cmp  edx,53
  848.     jbe  newi
  849.  
  850. ;    mov  eax,8                     ; open inbox
  851.     mov  ebx,295*65536+102
  852.     mov  ecx,190*65536+14
  853.     mov  edx,60
  854.     mov  esi,0x5577dd
  855.     int  0x40
  856.  
  857.     mov  eax,38                    ; line
  858.     mov  ebx,5*65536+430
  859.     mov  ecx,114*65536+114
  860.     mov  edx,0x000000
  861.     int  0x40
  862.  
  863.     mov  ebx,5*65536+133          ; info text
  864.     mov  ecx,0x000000
  865.     mov  edx,text
  866.     mov  esi,70
  867.   newline:
  868.     mov  eax,4
  869.     int  0x40
  870.     add  ebx,12
  871.     add  edx,70
  872.     cmp  [edx],byte 'x'
  873.     jne  newline
  874.  
  875.     mov  edx,I_END                ; text from server
  876.     call draw_server_data
  877.  
  878.     mov  eax,12
  879.     mov  ebx,2
  880.     int  0x40
  881.  
  882.     popa
  883.  
  884.     ret
  885.  
  886.  
  887. draw_server_data:
  888.  
  889.     pusha
  890.  
  891.     mov   eax,4
  892.     mov   ebx,10*65536+26
  893.     mov   ecx,8
  894.     mov   esi,[rxs]
  895.   dct:
  896.     pusha
  897.     mov   ecx,ebx
  898.     shl   ecx,16
  899.     mov   cl,9
  900.     mov   eax,13
  901.     mov   ebx,10*65536
  902.     mov   bx,word [rxs]
  903.     imul  bx,6
  904.     mov   edx,0xffffff
  905.     int   0x40
  906.     popa
  907.     push  ecx
  908.     mov   eax,4
  909.     mov   ecx,0
  910.     int   0x40
  911.     add   edx,[rxs]
  912.     add   ebx,10
  913.     pop   ecx
  914.     loop  dct
  915.  
  916.     popa
  917.     ret
  918.  
  919.  
  920.  
  921. text:
  922.  
  923. db '   Incoming mails are written to /rd/1/popc.txt                       '
  924. db '                                                                      '
  925. db '        Check for mail.                               Force close     '
  926. db '                                                                      '
  927. ip_text:
  928. db '   Server IP : 192.168.1.200            <                             '
  929. l2_text:
  930. db '   User      :                          <         Open popc.txt       '
  931.  l3_text:
  932. db '   Password  : (not shown)              <                             '
  933.  
  934. db 'x' ; <- END MARKER, DONT DELETE
  935.  
  936. file_start      dd      0x100000
  937.  
  938. ; max size is 0x100000 bytes, read to/write from 0x100000
  939. files:
  940.        dd  2,0,0,?,0x100000
  941.        db  0
  942.        dd  pr
  943. filel:
  944.        dd  0,0,0,0x100000,0x100000
  945. pr db  '/rd/1/popc.txt',0
  946.  
  947. ip     db 192,168,1,200
  948.  
  949. socket  dd  0x0
  950.  
  951. posx             dd  0x0
  952. incoming_pos     dd  0x0
  953. incoming_string: times 128 db 0
  954. pos          dd  0x0
  955.  
  956. text_start   dd  I_END
  957. print        db  0x0
  958. cmd          dd  0x0
  959. rxs          dd  66
  960.  
  961. res:         db  0,0
  962. command:     times  256  db 0x0
  963.  
  964. command_position  dd 0
  965. counter           dd 0
  966.  
  967. numtext      db  '                     '
  968. labelt       db  'POP client v ',version,0
  969. scroll:      dd 1,8
  970.  
  971. tinypad_start:
  972.         dd      7
  973.         dd      0
  974.         dd      pr
  975.         dd      0
  976.         dd      0
  977.         db      '/RD/1/TINYPAD',0
  978.  
  979. getmail:
  980.        db  'user xyz                      ',13,10
  981.        db  'pass xyz                      ',13,10
  982.        db  'retr 1                        ',13,10
  983.        db  'retr 2                        ',13,10
  984.        db  'retr 3                        ',13,10
  985.        db  'retr 4                        ',13,10
  986.        db  'retr 5                        ',13,10
  987.        db  'retr 6                        ',13,10
  988.        db  'retr 7                        ',13,10
  989.        db  'retr 8                        ',13,10
  990.        db  'retr 9                        ',13,10
  991.  
  992. quitc:
  993.        db  'quit        ',13,10
  994.  
  995. mcounter dd 900
  996. ccounter dd 0
  997.  
  998. ld   db 13,10
  999.  
  1000. server_active db 0
  1001.  
  1002. header_sent db 0
  1003.  
  1004. close_connection   dd 0x0
  1005.  
  1006. mail_rp      dd  0
  1007.  
  1008. irc_data   dd  0x0
  1009. addr       dd  0x0
  1010. ya         dd  0x0
  1011. len        dd  0x0
  1012.  
  1013. input1:  times 50 db 32
  1014. input2:  times 50 db 32
  1015. input3:  times 50 db 32
  1016.  
  1017. l1 dd 0
  1018. l2 dd 3
  1019. l3 dd 3
  1020.  
  1021. status  dd  0x0
  1022.  
  1023. I_END:
  1024.