资源简介
编程演示三种存储管理方式的地址换算过程:
1、分页方式的地址换算
2、分段方式的地址换算
3、段页式的地址换算
要求演示正确、清晰,编程所用工具不限。这里用Java语言,工具为myeclipse,实现动画演示。
代码片段和文件信息
/*
* AddressConversion.java
*
* Created on __DATE__ __TIME__
*/
package cn.com.address;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Toolkit;
import javax.swing.JOptionPane;
/**
*
* @author __USER__
*/
@SuppressWarnings(“serial“)
public class AddressConversion extends javax.swing.Jframe implements Runnable {
private PageAddressCon pageAddCon;
private SegmentAddressCon segAddCon;
private SegmentPageMemory segpageCon;
private int segmentNumber; //段号
private int logicalAddress;
int x y;//分别代表x轴和y轴的坐标
int width height;
int x1 x2 y1 y2;
private final int TOP_MARGIN = 80; //顶边距
private final int base_MARGIN = 63;//底边距
private final int RIGHT_MARGIN = 318;//右边距
private final int LEFT_MARGIN = 50;//左边距
private boolean drawPage = false;
private boolean drawSeg = false;
private boolean drawSP = false;
private boolean selectPage = true;
private boolean selectSeg = false;
private boolean selectSP = false;
private boolean isDefault = true;
private boolean isHandoff = false;
Font font = new Font(“宋体“ Font.PLAIN 15);
/** Creates new form AddressConversion */
public AddressConversion() {
initopera();
initComponents();
}
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/
//GEN-BEGIN:initComponents
//
private void initComponents() {
new javax.swing.JPopupMenu();
jPanel1 = new javax.swing.JPanel();
jPanel3 = new javax.swing.JPanel();
jToolBar1 = new javax.swing.JToolBar();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
jButton4 = new javax.swing.JButton();
jPanel2 = new javax.swing.JPanel();
jButton5 = new javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();
jTextField1 = new javax.swing.JTextField();
jLabel2 = new javax.swing.JLabel();
jTextField2 = new javax.swing.JTextField();
jLabel3 = new javax.swing.JLabel();
jTextField3 = new javax.swing.JTextField();
jLabel4 = new javax.swing.JLabel();
jTextField4 = new javax.swing.JTextField();
jLabel5 = new javax.swing.JLabel();
jTextField5 = new javax.swing.JTextField();
jLabel6 = new javax.swing.JLabel();
jTextField6 = new javax.swing.JTextField();
button1 = new java.awt.Button();
button2 = new java.awt.Button();
jMenuBar1 = new javax.swing.JMenuBar();
jMenu1 = new javax.swing.JMenu();
jMenu3 = new javax.swing.JMenu();
jSeparator1 = new javax.swing.JSeparator();
jMenuItem1 = new javax.swing.JMenuItem();
jMenuItem2 = new javax.swing.JMenuItem();
jMenuItem3 = new javax.swing.JMenuItem();
jSeparator2 = new javax.swing.JSeparator();
jMenuItem4 = new javax.swing.JMenuItem();
jMenu2 = new
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
..A..H. 162 2010-07-17 11:08 源码及文档\文档\~$系统课程设计报告.doc
文件 605184 2010-07-06 10:11 源码及文档\文档\操作系统课程设计报告.doc
文件 492 2010-07-03 16:44 源码及文档\源代码\operatingsystem\.classpath
文件 391 2010-06-24 14:46 源码及文档\源代码\operatingsystem\.project
文件 629 2010-06-24 14:46 源码及文档\源代码\operatingsystem\.settings\org.eclipse.jdt.core.prefs
文件 836 2010-07-05 13:50 源码及文档\源代码\operatingsystem\bin\cn\com\address\AddressConversion$1.class
文件 838 2010-07-05 13:50 源码及文档\源代码\operatingsystem\bin\cn\com\address\AddressConversion$10.class
文件 839 2010-07-05 13:50 源码及文档\源代码\operatingsystem\bin\cn\com\address\AddressConversion$11.class
文件 839 2010-07-05 13:50 源码及文档\源代码\operatingsystem\bin\cn\com\address\AddressConversion$12.class
文件 839 2010-07-05 13:50 源码及文档\源代码\operatingsystem\bin\cn\com\address\AddressConversion$13.class
文件 839 2010-07-05 13:50 源码及文档\源代码\operatingsystem\bin\cn\com\address\AddressConversion$14.class
文件 839 2010-07-05 13:50 源码及文档\源代码\operatingsystem\bin\cn\com\address\AddressConversion$15.class
文件 839 2010-07-05 13:50 源码及文档\源代码\operatingsystem\bin\cn\com\address\AddressConversion$16.class
文件 839 2010-07-05 13:50 源码及文档\源代码\operatingsystem\bin\cn\com\address\AddressConversion$17.class
文件 839 2010-07-05 13:50 源码及文档\源代码\operatingsystem\bin\cn\com\address\AddressConversion$18.class
文件 839 2010-07-05 13:50 源码及文档\源代码\operatingsystem\bin\cn\com\address\AddressConversion$19.class
文件 836 2010-07-05 13:50 源码及文档\源代码\operatingsystem\bin\cn\com\address\AddressConversion$2.class
文件 839 2010-07-05 13:50 源码及文档\源代码\operatingsystem\bin\cn\com\address\AddressConversion$20.class
文件 839 2010-07-05 13:50 源码及文档\源代码\operatingsystem\bin\cn\com\address\AddressConversion$21.class
文件 839 2010-07-05 13:50 源码及文档\源代码\operatingsystem\bin\cn\com\address\AddressConversion$22.class
文件 839 2010-07-05 13:50 源码及文档\源代码\operatingsystem\bin\cn\com\address\AddressConversion$23.class
文件 839 2010-07-05 13:50 源码及文档\源代码\operatingsystem\bin\cn\com\address\AddressConversion$24.class
文件 839 2010-07-05 13:50 源码及文档\源代码\operatingsystem\bin\cn\com\address\AddressConversion$25.class
文件 836 2010-07-05 13:50 源码及文档\源代码\operatingsystem\bin\cn\com\address\AddressConversion$3.class
文件 836 2010-07-05 13:50 源码及文档\源代码\operatingsystem\bin\cn\com\address\AddressConversion$4.class
文件 836 2010-07-05 13:50 源码及文档\源代码\operatingsystem\bin\cn\com\address\AddressConversion$5.class
文件 836 2010-07-05 13:50 源码及文档\源代码\operatingsystem\bin\cn\com\address\AddressConversion$6.class
文件 836 2010-07-05 13:50 源码及文档\源代码\operatingsystem\bin\cn\com\address\AddressConversion$7.class
文件 836 2010-07-05 13:50 源码及文档\源代码\operatingsystem\bin\cn\com\address\AddressConversion$8.class
文件 836 2010-07-05 13:50 源码及文档\源代码\operatingsystem\bin\cn\com\address\AddressConversion$9.class
............此处省略58个文件信息
- 上一篇:javaweb天气预报
- 下一篇:韩顺平 J2EE视频实战教程SERVLET百度云全
评论
共有 条评论