Home > other >  A beginner
A beginner

Time:10-07

5, brothers to write the detailed point

CodePudding user response:

Didn't say is what type, the number of signed here also didn't say how much a single-chip microcomputer, if it is of type int, 32-bit words: (4 bytes)

4//# define SYSTEM_BYTE type is 4 bytes
Typedef int SYSTEM_TYPE

1////# define SYSTEM_BYTE type is 1 byte
//typedef char SYSTEM_TYPE

The static struct
{
Int positive_number;
Int negative_number;
Int zero;
} analysis;

Void statistics (int addr)
{
SYSTEM_TYPE I;

For (I=0 x2000; I & lt; (0 x2000 + 100 * SYSTEM_BYTE); I +=SYSTEM_BYTE)
{
If (* I & gt; 0)
{
Analysis. Positive_number + +;
}
Else if (* I==0)
{
Analysis. Zero++;
}
The else
{
Analysis. Negative_number + +;
}
}
}

CodePudding user response:

reference 1/f, bleeds style 2018 response:
here did not say what the number of signed types, also did not say how much a single-chip microcomputer, if it is of type int, 32-bit words: (4 bytes)

4//# define SYSTEM_BYTE type is 4 bytes
Typedef int SYSTEM_TYPE

1////# define SYSTEM_BYTE type is 1 byte
//typedef char SYSTEM_TYPE

The static struct
{
Int positive_number;
Int negative_number;
Int zero;
} analysis;

Void statistics (int addr)
{
SYSTEM_TYPE I;

For (I=0 x2000; I & lt; (0 x2000 + 100 * SYSTEM_BYTE); I +=SYSTEM_BYTE)
{
If (* I & gt; 0)
{
Analysis. Positive_number + +;
}
Else if (* I==0)
{
Analysis. Zero++;
}
The else
{
Analysis. Negative_number + +;
}
}
}
eldest brother, I want to assembly language

CodePudding user response:

refer to the second floor weixin_45045280 response:
Quote: refer to 1st floor - style 2018 response:
here did not say what the number of signed types, also did not say how much a single-chip microcomputer, if it is of type int, 32-bit words: (4 bytes)

4//# define SYSTEM_BYTE type is 4 bytes
Typedef int SYSTEM_TYPE

1////# define SYSTEM_BYTE type is 1 byte
//typedef char SYSTEM_TYPE

The static struct
{
Int positive_number;
Int negative_number;
Int zero;
} analysis;

Void statistics (int addr)
{
SYSTEM_TYPE I;

For (I=0 x2000; I & lt; (0 x2000 + 100 * SYSTEM_BYTE); I +=SYSTEM_BYTE)
{
If (* I & gt; 0)
{
Analysis. Positive_number + +;
}
Else if (* I==0)
{
Analysis. Zero++;
}
The else
{
Analysis. Negative_number + +;
}
}
}
eldest brother, I want to assembly language
MOV DPTR, # 2000 h
MOV R0, # 0
The number of records the R0 is positive, I want to ask this is 00 h or write 0 can directly

CodePudding user response:

reference weixin_45045280 reply: 3/f
Quote: refer to the second floor weixin_45045280 response:
Quote: refer to 1st floor - style 2018 response:
here did not say what the number of signed types, also did not say how much a single-chip microcomputer, if it is of type int, 32-bit words: (4 bytes)

4//# define SYSTEM_BYTE type is 4 bytes
Typedef int SYSTEM_TYPE

1////# define SYSTEM_BYTE type is 1 byte
//typedef char SYSTEM_TYPE

The static struct
{
Int positive_number;
Int negative_number;
Int zero;
} analysis;

Void statistics (int addr)
{
SYSTEM_TYPE I;

For (I=0 x2000; I & lt; (0 x2000 + 100 * SYSTEM_BYTE); I +=SYSTEM_BYTE)
{
If (* I & gt; 0)
{
Analysis. Positive_number + +;
}
Else if (* I==0)
{
Analysis. Zero++;
}
The else
{
Analysis. Negative_number + +;
}
}
}
eldest brother, I want to assembly language
MOV DPTR, # 2000 h
MOV R0, # 0
The R0 is record the number of positive, I want to ask this is 00 h or write directly 0 can

It is ok to write directly 0, on behalf of the meaning is the same,

CodePudding user response:

reference blood presence, 4/f, 2018 response:
Quote: refer to the third floor weixin_45045280 response:

Quote: refer to the second floor weixin_45045280 response:
Quote: refer to 1st floor - style 2018 response:
here did not say what the number of signed types, also did not say how much a single-chip microcomputer, if it is of type int, 32-bit words: (4 bytes)

4//# define SYSTEM_BYTE type is 4 bytes
Typedef int SYSTEM_TYPE

1////# define SYSTEM_BYTE type is 1 byte
//typedef char SYSTEM_TYPE

The static struct
{
Int positive_number;
Int negative_number;
Int zero;
} analysis;

Void statistics (int addr)
{
SYSTEM_TYPE I;

For (I=0 x2000; I & lt; (0 x2000 + 100 * SYSTEM_BYTE); I +=SYSTEM_BYTE)
{
If (* I & gt; 0)
{
Analysis. Positive_number + +;
}
Else if (* I==0)
{
Analysis. Zero++;
}
The else
{
Analysis. Negative_number + +;
}
}
}
eldest brother, I want to assembly language
MOV DPTR, # 2000 h
MOV R0, # 0
The R0 is record the number of positive, I want to ask this is 00 h or write directly 0 can

Write the 0 can directly, on behalf of the meaning is the same,
thank you very muchnullnull
  • Related