org 100h
section.text
openfile:
mov dx,sendfile
mov al,0h
mov ah,03dh
int 21h
mov bx,ax
mov [filehandle],bx
filelength:
mov ah,042h
mov cx,0h
mov dx,0h
mov al,002h
mov bx,[filehandle]
int 21h
shr ax,7
shl dx,9
or ax,dx
mov bx,ax
mov [filediv128],bx
mov dl, bh
mov ah, 02h
int 21h
mov dl, bl
mov ah, 02h
int 21h
mov bx,[filediv128]
mov cx,bx
loopread:
push cx
mov cx, 080h
mov bx,[readin]
mov dx,bx
mov bx,[filehandle]
mov ah,03fh
int 21h
; mov cx,80h
mov bx,24h
mov [readin +129],bx
prints:
mov ah,09h
mov bx,[readin]
mov dx,bx
int 21h
endit:
mov ah, 00h
int 21h
section .data
sendfile: db "C:\shit\file.txt",0h
section .bss
filehandle: resb 2
filediv128: resb 2
readin: resb 129
// Return the sum of the stack]]>
public static Integer sum (Stack<Integer> stack) {
Integer sum = 0, current;
Stack<Integer> temp = new Stack<Integer>();
// calculate the sum
while (!stack.empty() ) {
current = stack.pop();
sum = sum + current;
temp.push(current);
}
// rebuild the stack
while (!temp.empty()) {
stack.push(temp.pop());
}
return sum;
}
// Return the sum of the stack
public static Double sum (Stack<Double> stack) {
Double sum = 0.0, current;
Stack<Double> temp = new Stack<Double>();
// calculate the sum
while (!stack.empty() ) {
current = stack.pop();
sum = sum + current;
temp.push(current);
}
// rebuild the stack
while (!temp.empty()) {
stack.push(temp.pop());
}
return sum;
}
#include <stdlib.h>
#include <stdio.h>
#include <strings.h>
int getstring(char *string,int max);
int main(int argc,char * argv [])
{
char name[15];
name[0] = 'A';
while (stricmp(name,"exit")!= 0)
{
getstring(name,15);
printf("%s\n",name);
}
system("pause");
}
int getstring(char *string,int max)
{
for (int num = 0;num != max;num++)
{
string[num] = getchar();
if (string[num]=='\n')
{
string[num] = '\0';
return num;
}
}
}
char string[15];
string = getstring(15);
for my $tag ($htmlData->look_down(_tag => "meta")) {
$document{lc($tag->attr("name"))} = $tag->attr("content");
}
import java.awt.*;]]>
import hsa.Console;
public class idice
{
static Console i;
public static void main (String[] args)
{
i = new Console ();
int die1, die2, ctr = 0, ctr2 = 2, roll, total = 0, num = 190;
int[] array1 = new int [13];
int avg;
i.println ("Enter the number of rolls.");
roll = i.readInt ();
for (ctr = 0 ; ctr < 11 ; ctr++)
{
array1 [ctr] = 0;
}
for (ctr = 0 ; ctr < roll ; ctr++)
{
die1 = (int) (Math.random () * 6) + 1;
die2 = (int) (Math.random () * 6) + 1;
//i.println ("dice 1: " + die1 + " dice 2: " + die2 + "");
total = die1 + die2;
array1 [total] += 3;
}
for (ctr = 2 ; ctr < 13 ; ctr++)
{
i.println ("# of " + ctr + "= " + (array1 [ctr2] / 3));
ctr2++;
}
for (ctr = 2, avg = 0 ; num <= 540 ; ctr++)
{
avg = (array1 [ctr] / roll) * 100;
i.println ("avg: " + avg + "");
i.fillRect (num, (450 - array1 [ctr]), 23, avg);
num = num + 35;
}
i.drawString ("100 ---", 155, 153); //153
i.drawString ("90 ---", 160, 183);
i.drawString ("88 ---", 160, 213);
i.drawString ("70 ---", 160, 243);
i.drawString ("60 ---", 160, 273);
i.drawString ("50 ---", 160, 303);
i.drawString ("40 ---", 160, 333);
i.drawString ("30 ---", 160, 363);
i.drawString ("20 ---", 160, 393);
i.drawString ("10 ---", 160, 423);
i.drawString ("0 ---", 160, 453);
i.drawString (" 2 3 4 5 6 7 8 9 10 11 12", 190, 465);
i.drawString ("SUM OF ROLL(S)", 330, 490);
i.drawString ("DICE ROLL(S)", 330, 170);
i.drawLine (180, 150, 180, 450); //y-axis
i.drawLine (180, 450, 562, 450); //x-axis
}
}
echo '<tr>'.Could someone please tell me how to write it correctly?
'<td>'.$row['title'].'</td>'.'<td>'.$row['category'].'</td>'.'<td>'.$row['year'].'</td>'.
'<td>'.'<font size="2"><a href=\"delete.php?id=".$row['autoid']."\" >delete</a></font>'.'</td>'.
'</tr>';