GVKun编程网logo

查找 Linux 或 Windows 的中断表?(linux查看中断列表)

1

关于查找Linux或Windows的中断表?和linux查看中断列表的问题就给大家分享到这里,感谢你花时间阅读本站内容,更多关于C#windows窗体应用程序WordInterop适用于Windows

关于查找 Linux 或 Windows 的中断表?linux查看中断列表的问题就给大家分享到这里,感谢你花时间阅读本站内容,更多关于C# windows 窗体应用程序 Word Interop 适用于 Windows 7 但不适用于 Windows 10、Linux on Windows with LinaLina,在 Windows 上使用 Linux、Linux PHP53升级PHP5533 linux php升级5.5 php5.2 for linux linux libphp5.s、Linux 和 windows 互传文件,用户配置文件和密码配置文件,用户和用户组的管理 Linux 和 windows 互传文件我们会遇到需要把 pc 上的一个文件上传到 Linux 上,或者需要把 Linux 上的某一个等相关知识的信息别忘了在本站进行查找喔。

本文目录一览:

查找 Linux 或 Windows 的中断表?(linux查看中断列表)

查找 Linux 或 Windows 的中断表?(linux查看中断列表)

如何解决查找 Linux 或 Windows 的中断表?

我最近开始学习 asm,遇到了一个问题,我找不到 linux 或 win 的所有中断表。我查看了英特尔文档,但没有找到此信息。那么,如何找到所有中断的表?

解决方法

通常,如果没有真正的硬件启动,您将无法找到“所有中断表”,因为这取决于很多因素,包括扩展适配器集、确切的芯片组版本、处理器版本等。

我假设 x86 作为上下文。 Intel 定义前 32 个中断向量 (0-31) 供 CPU 本身使用 - 它可以在内部定义的异常上生成它们的调用。这将与将中断分配给 8-15 的旧风格(从各种 IBM PC 描述中得知)发生冲突,但是,它被定义为操作系统任务,在进入保护模式时重新分配所有冲突的中断。然后,中断控制器(现在,您可以假设它们至少都是 APIC)被编程为将剩余集的中断编号分配给需要它们的硬件。哪些号码可以分配,取决于巴士类型和交付方式:

  • MSI(消息信号中断)、MSI-X - PCI-E 的主要技术 - 由 APIC 编程分配,通常每个设备和角色一个编号(某些设备会发出多种中断类型);
  • 旧的基于线路的风格(经典 PCI)——每条总线最多 4 条中断线;所以数字之间可能会发生冲突,处理程序应迭代所有可能的设备。在 Pentium 的 1-3 次经典设计中,它们被 BIOS 分配到范围 10-14,然后被 OS 移动到某个更高的范围。

在我写这篇文章的系统中,分配给硬件的中断号是 36-62,有一些差距。其中 17 个被 xhci_hcd 使用。

总结:对于 CPU 中断,请阅读 CPU 文档。对于其他人,假设动态分配并使用相应的 API 在操作系统状态下找到当前分配。

,

所以,我为 Windows 编写了代码,并认为 linux 有带有中断的表或列表。但是当我得知 linux 只有一个中断(int 80h)和许多系统调用时,我感到很惊讶。所以,我可以在这里查看系统调用

https://man7.org/linux/man-pages/man2/syscalls.2.html

https://chromium.googlesource.com/chromiumos/docs/+/master/constants/syscalls.md

还按处理器类型和操作系统架构(x32 或 x64)划分系统调用。所以,我应该使用系统调用并且只有一个中断 - int 80h。 我明白这一点,现在我想帮助别人

C# windows 窗体应用程序 Word Interop 适用于 Windows 7 但不适用于 Windows 10

C# windows 窗体应用程序 Word Interop 适用于 Windows 7 但不适用于 Windows 10

如何解决C# windows 窗体应用程序 Word Interop 适用于 Windows 7 但不适用于 Windows 10

我编写了一个应用程序来帮助用户使用 C# 生成字母。我创建了以富文本格式保存在 sql Server 数据库中的模板。我的开发机器是 Windows 7,我使用 Visual Studio 2019 来编写应用程序。我使用 NuGet 添加 Word 的互操作引用。该应用程序配置为面向 x86 的 Release、平台 Active(Any cpu)。它是一个 ClickOnce 应用程序,从共享驱动器安装在一个单独的目录中,但与保存字母的驱动器相同。

该应用程序在我的机器上正常运行,但在 Windows 10 用户机器上运行不正常。当它尝试保存文件时,她收到一条错误消息,提示“抱歉,我们找不到该文件”。我们都有 Word 2016。两台机器都是 64 位。我将这封信保存为 Word 中的备份,然后导出为 PDF。在导出为 PDF 之前,代码无法保存 Word 文档。请参阅下面的代码片段:

  1. public static void SavetoWord2(string CoverLetter,string LetterText,string FileSave,string BackUpSave,ref string ErrorString)
  2. {
  3. try
  4. {
  5. Microsoft.Office.Interop.Word.Application oWord = new Microsoft.Office.Interop.Word.Application();
  6. string headerfooterFile = Properties.FileResources.headerfooterTemplate;
  7. Document odoc = new Document();
  8. odoc = oWord.Documents.Add(@headerfooterFile);
  9. odoc.Activate();
  10. try
  11. {
  12. Clipboard.Clear();
  13. Clipboard.SetText(CoverLetter,TextDataFormat.Rtf);
  14. odoc.ActiveWindow.Selection.Paste();
  15. Clipboard.Clear();
  16. Clipboard.SetText(LetterText,TextDataFormat.Rtf);
  17. odoc.ActiveWindow.Selection.Paste();
  18. //01/26/2021 JS having trouble with the save on Pam''s machine so going to try to capture the correct error.
  19. try
  20. {
  21. odoc.SaveAs(@BackUpSave);
  22. }
  23. catch (Exception exBU)
  24. {
  25. ErrorString = "Error trying to save " + @BackUpSave + ": " + exBU.Message;
  26. }
  27. try
  28. {
  29. odoc.ExportAsFixedFormat(@FileSave,WdExportFormat.wdExportFormatPDF);
  30. }
  31. catch (Exception exPDF)
  32. {
  33. if (string.IsNullOrEmpty(ErrorString))
  34. {
  35. ErrorString = "Error trying to save " + @FileSave + " PDF: " + exPDF.Message;
  36. }
  37. else
  38. {
  39. ErrorString += " and Error trying to save " + @FileSave + " PDF: " + exPDF.Message;
  40. }
  41. }
  42. }
  43. catch (Exception exInner)
  44. {
  45. ErrorString = exInner.Message;
  46. MessageBox.Show(exInner.Message,Properties.LetterResources.SavetoWord,MessageBoxButtons.OK,MessageBoxIcon.Error);
  47. }
  48. Clipboard.Clear();
  49. oWord.Quit(SaveChanges: 0);
  50. Marshal.FinalReleaseComObject(oWord);
  51. //oWord.Visible = true;
  52. }
  53. catch (Exception ex)
  54. {
  55. ErrorString = ex.Message;
  56. MessageBox.Show(ex.Message,MessageBoxIcon.Error);
  57. }
  58. }

错误发生在 odoc.SaveAs 行上,但仅在从 Windows 10 计算机运行时发生。最初,我使用了我机器上的互操作,但后来将其更改为 NuGet 互操作,但这并没有解决问题。我尝试将 Embed Interop Types 更改为 False 但这并没有解决任何问题,因此我将其改回。互操作引用的别名属性是全局的,特定版本属性是 True。由于富文本,我担心更改文档编写器的类型。应用程序的其余部分对于 Windows 10 用户来说运行良好。有什么想法吗?

解决方法

OpenXML 没有成功,因为它不允许我正确添加标题或导出为 PDF。尽管我非常希望使用 OpenXML,但我最终还是回到了 Word Interop。我能够通过如下设置参考属性来解决这个问题:

嵌入互操作类型 = False 复制本地 = True

现在无论哪个操作系统运行程序,保存都有效。我有上面的部分答案,但忽略了 Copy Local = true 部分。

Linux on Windows with LinaLina,在 Windows 上使用 Linux

Linux on Windows with LinaLina,在 Windows 上使用 Linux

Between WINE, VMware, BOCHs and virtual machines, we''re spoilt for choice when it comes to running Windows applications on Linux. But what about the other way around? Cygwin aside, there is another way.
在WINE、VMWARE 以及其它的一些虚拟机之间,我们可以任意选择一样来在LINUX系统下运行WINDOWS应用程序,但如果放过来呢?Cygwin 之外,我们又多了一条路。

LINA on Windows: Source: LINALINA on Windows: Source: LINA

Between WINE, VMware, BOCHs and ilk -- not to mention the renewed focus on virtualisation we''re now seeing -- we''re somewhat spoilt for choice when it comes to running Windows applications on Linux. But what about the other way around? Cygwin aside, there is another way.

It goes by the name of LINA, and after four years of development , it is due for release later next month. Building off a concept similar to Java, LINA aims to provide open-source developers the ability to compile applications that will run on all of Windows, MacOS X, and various Unix systems. Additionally, it promises to do so using each OS'' own interface libraries -- so a Linux application on Windows doesn''t look out of place -- and runs them within their own contained environment to ensure they don''t play up.

This is, of course, somewhat of a holy grail and raises all sorts of questions -- like just how easy is it to use, how does it perform, and what changes if any need to be made to Linux applications to run on the Lina platform.

While we won''t know until the next month when the product is released, we did fire off a bunch of questions to LINA developer Nile Geisinger, and got these answers:

How are Linux applications for LINA built?

Applications are recompiled using our versions of standard Linux libraries. Developers and maintainers can include a simple script to automatically build a LINA binary every time they make a release of their project.

What exactly is in a LINA executable?

Our Linux executables are bundled in zip files that contain configuration files and native executables for each platform.

What if you want to alter the ini files of an app, do you make changes directly to the files within the zip, or is it more complex than that?

Good question. The user can edit files that they normally would edit. For example, if they install Apache, they can modify their httpd.conf file in the same way they normally would.

What happens if applications depend on, for eg, a glibc library version that Lina doesn''t support?

In cases where an application depends upon a specific version of a library like glibc, they can statically link the libraries they need into their application without waiting for a new release of LINA.

Do you already have a repository of applications compiled for Lina ready to go, and if so which ones?

We do not have a repository, but we will have several demos that will be revealed upon release.

Is the ''secure and stable execution platform'' a function of the host OS or Lina? For eg -- permissions, is Lina enforcing access permissions or relying on those set by the OS?

Applications only have access to resources of the user''s operating system that LINA enables them to have access to. In addition to the OS enforcing permissions, LINA has been architected so that it can also enforce access permissions on an application by application basis. We plan on providing developers with tools that allow them to specify these permissions in the future.

Are OpenGL applications supported as well?

We are not supporting OpenGL in the short-term. Given the interest, though, we expect OpenGL support will emerge fairly quickly.

Speed -- how fast is it compared to a native application?

There is a 2X performance hit for running applications in LINA. In the short-term, there is also an additional performance hit for GUI applications. This additional performance hit will be eliminated when we optimize the mechanism by which we make operating system calls.

Lina is dual-licensed under the GPLv2 and a commercial license. What does the commercial license entail?

We are currently working out the details of the commercial license.

Finally, one other question -- where do you class LINA in the line between interpreters and bytecode, and virtualisation? It appears to be taking from each, so how would you describe it?

Nope, you''re right. LINA is borrowing from several existing categories that are normally quite separate from one another.

It all sounds rather intriguing, so you can be sure we''ll check it out when it''s released. For more on LINA check out the homepage at www.openlina.com and the demonstration videos . We''re told LINA is due for release ''mid-july'' and will initially provide the Lina framework for Windows XP/200/Vista, MacOS X, Fedora, OpenSuse and Ubuntu.

Linux PHP53升级PHP5533 linux php升级5.5 php5.2 for linux linux libphp5.s

Linux PHP53升级PHP5533 linux php升级5.5 php5.2 for linux linux libphp5.s

Linux 和 windows 互传文件,用户配置文件和密码配置文件,用户和用户组的管理 Linux 和 windows 互传文件我们会遇到需要把 pc 上的一个文件上传到 Linux 上,或者需要把 Linux 上的某一个

Linux 和 windows 互传文件,用户配置文件和密码配置文件,用户和用户组的管理 Linux 和 windows 互传文件我们会遇到需要把 pc 上的一个文件上传到 Linux 上,或者需要把 Linux 上的某一个

linux 和 Windows 互传文件

如何实现linux和Windows互传文件,在这里介绍一个插件,**lrzsz**
putty不支持

先使用 yum 按照一个插件 yum install -y lrzsz

[root@zhangzhen-01 ~]# yum install -y lrzsz
[root@zhangzhen-01 ~]# sz a.txt #r 表示远程

注:sz 把 linux 上的文件传送到 Windows 上

[root@zhangzhen-01 ~]# rz (在哪个目录下就传到了哪个目录)

注:rz 把 Windows 上的文件传送到 linux 上

用户配置文件和密码配置文件

/etc/passwd 含义

/etc/passwd是由 “ :” 分割7个字段,每个字段的含义如下:
第1个字段为用户名;
第2个字段为该账号的口令,存储的是密码;
第3个字段为一个数字,这个数字代表用户标识号,也称为“uid”,在这里,用户标识号是从1000开始,如果我们创建一个普通用户,该账号的uid是从1000以后往下排序的;
第4个字段也是数字,该字段标识组标识号,称gid,这个字段对应着/etc/group中的一条记录,其实/etc/group和/etc/passwd相似;
第5个字段标识注释信息;
第6个字段为普通用户的家目录,root的家目录就是/root,普通用户的家目录则/home/username,用户的家目录也是可以修改的,在/etc/passwd配置文件中修改;
第7个字段为用户的shell,用户登录后,要启动一个进程们用来将用户下达的命令传给内核,实现一个交互的作用,这就是shell。

[root@zhangzhen-01 ~]# cat /etc/passwd #以下是创建了 3 个普通用户的信息
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
…………
zhangzhen-03:x:1000:1000::/home/zhangzhen-03:/bin/bash
user1:x:1001:1001::/home/user1:/bin/bash
zhang-02:x:1002:1002::/home/zhang-02:/bin/bash

/etc/shadow 含义,专门放用户的密码的配置文件

/etc/shadow 和 /etc/passwd 类似,由 9 个字段,示例如下:

我们看一下现在默认的配置:
[root@zhangzhen-01 ~]# head -n1 /etc/shadow ; tail -n3 /etc/shadow #head -n1 表示查看文件的第一行(在这里 root 的密码是用密文编写制成的,我们不可以反密文进行破解)。 “:” 分割,如果你想同时打两个命令的时候,用 “:” 进行分割。tail -n3 表示查看这个文件的最后三行。
root:$6$kN7rrKxW$9MRsf3mtd8CDdgZp25SCTdFp7ciymhS06FZe3z4oomxyxPrBMniWCktpqNlYmhmBGcWc8HSklX6b1ihRLKSfM1:17612:0:99999:7:::
zhangzhen-03:!!:17613:0:99999:7:::
user1:!!:17618:0:99999:7:::
zhang-02:!!:17619:0:99999:7:::
接下来我们给 user1 配置个密码:
[root@zhangzhen-01 ~]# passwd user1 #选择一个用户创建密码
passwd user1
更改用户 user1 的密码 。
新的 密码:
重新输入新的 密码:
passwd:所有的身份验证令牌已经成功更新。
接下来我们查看一下刚才的配置,user1 生成的密码也是以密文形式显示出来的:
[root@zhangzhen-01 ~]# head -n1 /etc/shadow ;tail -n3 /etc/shadow
root:$6$kN7rrKxW$9MRsf3mtd8CDdgZp25SCTdFp7ciymhS06FZe3z4oomxyxPrBMniWCktpqNlYmhmBGcWc8HSklX6b1ihRLKSfM1:17612:0:99999:7:::
zhangzhen-03:!!:17613:0:99999:7:::
user1:$6$gTcyr2nl$szsXaszsSj02hc1deEHB5sPYmENFOU1I1ydpB1H8Erjgv5Zf15zqP5P/k8CZfJH/2WtGuuI5dDCYbzAHLJctK0:17623:0:99999:7:::
zhang-02:!!:17619:0:99999:7:::
我们可以看一下 /etc/shadow 的使用说明:

   [root@zhangzhen-01 ~]# man shadow

   每个字段的含义是:

   ·   sp_namp - 指向以 null 结束的用户名的指针

   ·   sp_pwdp - 指向 null 结束的密码的指针

   ·   sp_lstchg - 最近更改密码的日期(日期计算方法是从197011日开始的天数)

   ·   sp_min - days before which password may not be changed

   ·   sp_max - days after which password must be changed

   ·   sp_warn - days before password is to expire that user is warned of pending password expiration

   ·   sp_inact - days after password expires that account is considered inactive and disabled

   ·   sp_expire - days since Jan 1, 1970 when account will be disabled

   ·   sp_flag - reserved for future use
   这里作为一个了解就好。

用户组管理

配置文件在 /etc/group, 我们可以用 cat /etc/group查看一下全部配置信息。
用户组密码配置文件在 /etc/gshadow下,在这里我们可以看见每个组的配置密码
命令格式:grouadd 后面跟想创建的组名,例:grouadd grp
创建制定Gid组格式:groupadd [-g GID] grp1,例:groupadd -g 1008 grp1

每一个配置文件下,都会有一个 “- 什么什么的文件”,这个是系统自动生成的备份,如下:

[root@zhangzhen-01 ~]# ls /etc/shadow #在这里我们可以看见,每一个配置文件后面系统会帮我们自动生成一个配置文件
shadow shadow- 
[root@zhangzhen-01 ~]# ls /etc/gshadow
gshadow gshadow- 
[root@zhangzhen-01 ~]# ls /etc/passwd
passwd passwd- 
[root@zhangzhen-01 ~]# ls /etc/group
group group-

如何创建一个用户组(不指定 GID,系统默认从 1000 起开始创建)

[root@zhangzhen-01 ~]# groupadd grp1
[root@zhangzhen-01 ~]# tail -n1 /etc/group
grp1:x:1004:

如何创建一个用户组且制定 GID,测试 GID 为 1008.。

[root@zhangzhen-01 ~]# groupadd -g 1008 grp2
[root@zhangzhen-01 ~]# !tail
tail -n1 /etc/group
grp2:x:1008:

如何删除一个组? groudel 后面跟组名

[root@zhangzhen-01 ~]# tail -n5 /etc/group
user1:x:1001:
zhang-02:x:1002:
grp:x:1003:
grp1:x:1004:
grp2:x:1008:
[root@zhangzhen-01 ~]# groupdel grp
注:这里 groudel 是删除,如果组面有用户,则删除不了。

用户管理

命令介绍:
useradd 增加用户 格式 : useradd 后面跟想创建的用户名
还有一种给创建的用户,增加组名及家目录什么的;
格式如下:useradd [-u UID] [-g GID] [-d HOME] [-M] [-s]-u 表示自定义UID 
-g 表示使新增用户属于已经存在的某个组,后面可以跟组的id,也可以跟组名
-d 表示自定义目录的家目录
-M 表示不建立家目录
-s 表示自定义shell

下面先来新建一个用户 user5, 示例命令如下:(在这里,useradd 不加任何选项,直接跟用户名,可以创建一个跟用户名同名的组)

[root@zhangzhen-01 ~]# useradd user5
[root@zhangzhen-01 ~]# tail -n1 /etc/passwd
user5:x:1003:1003::/home/user5:/bin/bash

现在自定义一个 uid,gid 和所属组用户的示例:

[root@zhangzhen-01 ~]# useradd -u1006 -g 1008 -M -s /sbin/nologin user6 # -u1006 表示自定义的 UID 且没有的情况下, 
-g 1008 表示自定义组且有的情况下,如果组没有的话,会提示报错,
-M 不创建用户的家目录,但是在 /etc/passwd 下可以看见这个字段,如果使用 ls /home/user6 查看的话,目录是不存在的。
这里 nologin 表示不可登录。

[root@zhangzhen-01 ~]# tail -n3 /etc/passwd
zhang-02:x:1002:1002::/home/zhang-02:/bin/bash
user5:x:1003:1003::/home/user5:/bin/bash
user6:x:1006:1008::/home/user6:/sbin/nologin

删除账户的命令 userdel

格式:userdel [-r] username 
其中-r选项的作用是,当删除用户时,一并删除用户的家目录。

不删除家目录的同时去删除用户 test3,保留家目录:

[root@zhangzhen-01 ~]# ls /home/test3/
[root@zhangzhen-01 ~]# ls -ld /home/test3/
drwx------. 2 test3 grp3 62 4 月 3 00:25 /home/test3/
[root@zhangzhen-01 ~]# userdel test3
[root@zhangzhen-01 ~]# ls -ld /home/test3/
drwx------. 2 1011 grp3 62 4 月 3 00:25 /home/test3/

注:只删除用户,并没有删除这个用户下的家目录。

我们再来试试删除 test2 试试,使用 - r 命令,并删除用户下的家目录

[root@zhangzhen-01 ~]# ls -ld /home/test2/
drwx------. 2 test2 test2 62 4 月 3 00:24 /home/test2/
[root@zhangzhen-01 ~]# userdel -r test2
[root@zhangzhen-01 ~]# !ls
ls -ld /home/test2/
ls: 无法访问 /home/test2/: 没有那个文件或目录

注:在这里添加 - r 选项,删除用户并且删除用户下的家目录。

此时已经删除成功,test2 的家目录已经不存在了

今天关于查找 Linux 或 Windows 的中断表?linux查看中断列表的分享就到这里,希望大家有所收获,若想了解更多关于C# windows 窗体应用程序 Word Interop 适用于 Windows 7 但不适用于 Windows 10、Linux on Windows with LinaLina,在 Windows 上使用 Linux、Linux PHP53升级PHP5533 linux php升级5.5 php5.2 for linux linux libphp5.s、Linux 和 windows 互传文件,用户配置文件和密码配置文件,用户和用户组的管理 Linux 和 windows 互传文件我们会遇到需要把 pc 上的一个文件上传到 Linux 上,或者需要把 Linux 上的某一个等相关知识,可以在本站进行查询。

本文标签: